You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
522 B

--- a/django/db/migrations/loader.py
+++ b/django/db/migrations/loader.py
@@ -106,7 +106,7 @@ class MigrationLoader(object):
# Scan for .py files
migration_names = set()
for name in os.listdir(directory):
- if name.endswith(".py"):
+ if name.endswith(".py") or name.endswith(".pyc"):
import_name = name.rsplit(".", 1)[0]
if import_name[0] not in "_.~":
migration_names.add(import_name)