Shawn -- what do you recommend instead? A friend and I recently had
this debate. His suggestion was to split off as much behavior into
smaller apps with only a handful of models in the models.py as
possible, but I said that if it's not reusable, it shouldn't be an
app. I still haven't found a solution for organizing large-scale
Django app model structures that I'm happy with.

On Fri, Oct 7, 2011 at 10:43 AM, Shawn Milochik <sh...@milochik.com> wrote:
> Make as many files as you want, and make sure you import their classes in
> models.py so they get picked up by syncdb.
> Normally, to do something like this you'd replace the file (in this case
> models.py) with a folder named 'models' containing a file called
> __init__.py, and import all the additional files' models in __init__.py.
> However, there's some "magic" in Django that doesn't consider a folder a
> "Django app" unless it contains a file named models.py.
> Also, I recommend you don't do any of the above, because as soon as you
> start doing things like creating foreign keys and many-to-many relationships
> you're going to have a horrific mess, and probably circular imports.
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to