Reputation: 6247
I'm relatively new to Django and am having difficulty laying out my project. Let's say it's for user-created movie reviews (it's not). Here are the main components:
All these components share the same model, so it's pretty clear that they belong in the same project. My question is, are the browser-app and API Django apps or sites?
Upvotes: 1
Views: 407
Reputation: 5701
It took me a few projects to fully grok the intended app/project layout (http://www.b-list.org/weblog/2006/sep/10/django-tips-laying-out-application/) but once I started following this pattern, everything became much simpler.
Each app should be a isolated concern though not necessarily fully independent. I'm not sure I'd create a project that had a "main" app and a "mobile" app. I'd rather segment based on concern such as: account mgmt, search, etc. And in each of those apps, I would expose urls specifically used for mobile.
It's especially helpful for team development and managing migrations. If you just have one app and the team is generating multiple migrations in a sprint, it can become unwieldy to coordinate.
Hope this makes sense.
Upvotes: 1
Reputation: 9246
My way to solve this problem:
Upvotes: 0