3 ms·
As things get more complicated, I will separate out by some kind of concept. Which can be something as simple as: /coreapp /forms_foo.py /forms_bar.p
by 3eb7988a1663 2mo ago
As things get more complicated, I will separate out by some kind of concept. Which can be something as simple as:
/coreapp
/forms_foo.py
/forms_bar.py
/models_bar.py
/models_foo.py
/views_bar.py
/views_foo.py
You can do a more sophisticated module layout, but essentially something as straightforward as the above, all under a single "core" application. Prevents Django from fighting you when you want to work across the arbitrary "app" boundary.
- selcuka 2mo agoYou can also have a /models/ package with foo.py, bar.py under it. It is easier to maintain. As an additional bonus, you can add an __init__.py that imports all models if you want to be able to do a `from .models import FooModel`.