My project consists of several django applications that need to be deployed differently, possibly on different machines. However often these apps occasionally need to access each other's models, so I was thinking of "externalizing" my models so that they can be accessed more elegantly from any app. So the idea is to do have directory structure resembling something like this:
/
+ application1
+ application2
+ models
Is there a functional point to doing that (other than code maintainability), since the applications can cross-reference each other?
The following paragraph in the django book makes me think that that's probably not a good idea (I added the bold formatting):
However, there’s one requirement regarding the app convention: if you’re using Django’s database layer (models), you must create a Django app. Models must live within apps. Thus, in order to start writing our models, we’ll need to create a new app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With