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

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