summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/db/migrations/loader.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py
index 79de511860..dd0f37d135 100644
--- a/django/db/migrations/loader.py
+++ b/django/db/migrations/loader.py
@@ -97,7 +97,10 @@ class MigrationLoader:
if was_loaded:
reload(module)
self.migrated_apps.add(app_config.label)
- migration_names = {name for _, name, is_pkg in pkgutil.iter_modules(module.__path__) if not is_pkg}
+ migration_names = {
+ name for _, name, is_pkg in pkgutil.iter_modules(module.__path__)
+ if not is_pkg and name[0] not in '_~'
+ }
# Load migrations
for migration_name in migration_names:
migration_path = '%s.%s' % (module_name, migration_name)