#18954: Initial sql data documentation
-------------------------------+--------------------
Reporter: jli | Owner: nobody
Type: New feature | Status: new
Component: Documentation | Version: 1.4
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
Ok on this page:
https://docs.djangoproject.com/en/dev/howto/initial-data/#providing-
initial-sql-data
I think it would be nice to add that if for some reason you're using
models as a directory with __init__.py that import every sub modules in
there, you need to actually move the sql folder inside your models folder.
So to be clear:
usual setups is :
my_app/
sql/
mymodel.sql
models.py --> myModel
the setup that needs documentation:
my_app/
models/
mymodelgroup.py --> myModel
anothermodelgroup.py --> anotherModel
sql/
mymodel.sql
There is no info anywhere about this, I don't know if it's a feature or a
bug by the way.
But it make sense I think to move the sql script inside the models folder
it it's actually a folder.
Cheers!
--
Ticket URL: <https://code.djangoproject.com/ticket/18954>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.