There's nothing wrong with parceling out models across different apps.
And unless you're planning on distributing each app separately, don't
worry about cross-app dependencies.

In this case, I'd encourage you to--since you'll probably want to do
more than just book-related stuff with your people. (The same could be
said about the books.)

Another reason to have 2 apps for these models is overall growth of
models.py. The more code that's there, the harder it becomes to edit.
(I'm in the process of parceling out a bunch of models myself. Don't
give yourself that headache!)

E

On Wed, Apr 23, 2008 at 3:29 PM, Jay <[EMAIL PROTECTED]> wrote:
>
>  I'm working on a project which for the purposes of this conversation
>  we could say is about authors writing and sharing books.
>
>  My tendency is to want to make an app called "people" and an app
>  called "books," as these are two different models in my mind.  A
>  person has certain attributes which would be defined in the "person"
>  model, and the book has certain attributes which would be defined in
>  the "book" model.
>
>  For some reason it's weirding me out to put these in the same app.  I
>  think because seeing tables like people_book or books_person doesn't
>  feel right.  I imagine something more like:
>
>  books_book
>  books_genre
>  people_person
>  people_group
>  people_person_contacts
>
>  But I need to make the link between the author (person) and the book.
>  In the django docs I see that you can easily make a foreign key by
>  referencing the model:
>
>   manufacturer = models.ForeignKey('production.Manufacturer')
>
>  ...but it feels like maybe stepping outside the "django way."
>
>  I know there's no definitive answer, but at what point do you
>  typically decide that something belongs in it's own app?  Is it
>  typical to dump everything into a single app?
>  >
>



-- 
portfolio: http://textivism.com/
blog: http://erikanderica.org/erik/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to