python - How to approach Django project starting with database schema? -
every django tutorial/book i've seen approaches django projects going characterize ad-hoc database design method. project ends-up being bunch of little apps, each it's own models, view, etc.
i trying locate resource covers how structure django project when do, in fact, start traditional db design process.
for example, let's starting point:

and document describing it:
how 1 approach various django apps access single "global" (bad word) db model covers entire schema rather bunch of models spread across bunch of apps?
are there resources (books, pdf's, tutorials) cover approach rather piece-meal approach commonly seen?
a corollary question might be: there a, perhaps automated, way go sql (or mysql workbench) schema definition equivalent django orm?
you can use inspectdb command generate models.py database: http://docs.djangoproject.com/en/dev/ref/django-admin/#inspectdb
then, can treat models single app, , add more features/tables new apps in future.
Comments
Post a Comment