Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#10985 closed (wontfix)

Explain how models can be organised in a directory

Reported by: anonymous Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords: model models
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If you want to split models.py into smaller chuncks you will possibly go the way of creating a models/ directory. But there is some gotchas that are well explained here:

http://groups.google.com/group/django-users/browse_thread/thread/3266a22af6c39437/90eee86aa3e6f732

I propose to add this gotcha somewhere to the documentation, since it is something very common to do when the project grows.

Change History (3)

comment:1 by anonymous, 16 years ago

comment:2 by Chris Beaven, 16 years ago

Resolution: wontfix
Status: newclosed

Django's committers don't like documenting workarounds. The real work here is being done in #3591

comment:3 by Samus_, 15 years ago

given that #3591 has been open for three years and it still doesn't have a definite resolution let me add the following for future reference:

(from the email) the trick is to add the app_label on the Meta class and import all from models/init.py

also notice that if you have custom SQL or fixtures they have to be placed inside the models/ directory not in your app dir as the documentation says.

Note: See TracTickets for help on using tickets.
Back to Top