Changes between Version 7 and Version 8 of CookBookSplitModelsToFiles
- Timestamp:
- Jan 12, 2008, 5:39:51 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CookBookSplitModelsToFiles
v7 v8 1 1 = CookBook - [wiki:CookBookDataModels Data Models] - Splitting models across multiple files = 2 2 3 To split models across multiple files, you can do the following (works at least with revision 2819 ; verified to work without the Meta class app_labels, with main branch revision 7013):3 To split models across multiple files, you can do the following (works at least with revision 2819). 4 4 5 5 The important thing to notice here is the {{{app_label}}} attribute in the {{{Meta}}} class. If that is omitted, a subsequent {{{manage.py syncdb}}} run will not pick up these models. 6 6 7 7 '''NOTE:''' When #2982 gets applied you won't need the {{{Meta}}} class anymore, so if this link: #2982 has a strike-through and you are running svn, you don't need the {{{Meta}}} class. 8 9 This has been verified to work without the Meta class app_labels, in the current main branch. 8 10 9 11 {{{apps/polls/models/__init__.py}}}: