Opened 4 years ago

Closed 3 years ago

#18954 closed New feature (wontfix)

Initial sql data documentation

Reported by: Jonathan Liuti Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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!

Change History (2)

comment:1 Changed 4 years ago by Tim Graham

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 3 years ago by Tim Graham

Resolution: wontfix
Status: newclosed

I'm going to "won't fix" this and just fix the bug (#14300).

Note: See TracTickets for help on using tickets.
Back to Top