Migrations created in wrong directory for models defined in model package
|Reported by:||anonymous||Owned by:||MarkusH|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||no|
Django supports to split a bunch of models into a separate Python modules which are placed in a models Python package. However the django.db.migrations.writer.MigrationWriter does not reflect this fact in its path property.
The solution is easy:
If myapp.models is a Python app_module (currently line 61) has a __path__ attribute. If it is a Python module there is no such attribute.
I'm going to write a patch and open a pull request for further discussion.
Change History (8)
comment:1 Changed 6 months ago by timo
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:2 Changed 6 months ago by Markus Holtermann <info@…>
- Has patch set
- Needs tests set
- Owner changed from MarkusH to anonymous
- Status changed from new to assigned