#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 , 16 years ago
comment:2 by , 16 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:3 by , 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.
Django's committers don't like documenting workarounds. The real work here is being done in #3591