Am I missing something here?
Am I missing something here?
The pitch that you can "reuse" apps across projects always seemed weird to me, because that's basically never something you actually want to do/can do easily without major surgery.
- models
cheese.py
spam.py
__init__.py
You can then put all your cheese related models in cheese.py, and all your spam related models in spam.py. Then Simply import those models from __init__.py and django is none the wiser that anything changes. Tada: organized models without having to dive into the broken mess that is apps.The same trick of course applies to any python file you want to split up. Views, urls, managers, etc etc.
IMO migrations in combinations with apps are fully broken in django. it's unworkable for large projects.
Or take a look at https://djangopackages.org/ for examples of apps people like to share.
I understand if you want to distribute your app for others to incorporate, but otherwise it felt like the documentation overemphasizes the "app" aspect. It's a reasonable structure but more of a guideline... unless you want to reuse in other codebases
Also, apps override each other in the order or import. E.g one app can override the template of another just by using the same name. This means you can plug AND extend.