mirror of
https://github.com/django/django.git
synced 2025-09-14 22:45:45 +00:00
Fixed #21283 -- Added support for migrations if models is a package.
Thanks Markus Holtermann for the report.
This commit is contained in:
parent
96d1d4e292
commit
584110417f
9 changed files with 46 additions and 13 deletions
|
@ -41,8 +41,8 @@ class MigrationLoader(object):
|
|||
def migrations_module(cls, app_label):
|
||||
if app_label in settings.MIGRATION_MODULES:
|
||||
return settings.MIGRATION_MODULES[app_label]
|
||||
app = cache.get_app(app_label)
|
||||
return ".".join(app.__name__.split(".")[:-1] + ["migrations"])
|
||||
else:
|
||||
return '%s.migrations' % cache.get_app_package(app_label)
|
||||
|
||||
def load_disk(self):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue