From a3c01b0dd8060f00a5ffd2589a776b4f618af6d9 Mon Sep 17 00:00:00 2001 From: Markus Holtermann Date: Sat, 12 Sep 2015 10:23:10 +1000 Subject: Fixed #24919 -- Allowed disabling of migrations on a per app basis --- django/db/migrations/loader.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'django') diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py index a8f4be47b9..93aa8e61f7 100644 --- a/django/db/migrations/loader.py +++ b/django/db/migrations/loader.py @@ -66,6 +66,9 @@ class MigrationLoader(object): for app_config in apps.get_app_configs(): # Get the migrations module directory module_name = self.migrations_module(app_config.label) + if module_name is None: + self.unmigrated_apps.add(app_config.label) + continue was_loaded = module_name in sys.modules try: module = import_module(module_name) -- cgit v1.3