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.
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/18954#comment:1>
* status: new => closed
* resolution: => wontfix
Comment:
I'm going to "won't fix" this and just fix the bug (#14300).
--
Ticket URL: <https://code.djangoproject.com/ticket/18954#comment:2>