Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openwrt/packages-abandoned.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python/django1/patches/001-load-byte-compiled-db-migrations.patch')
-rw-r--r--lang/python/django1/patches/001-load-byte-compiled-db-migrations.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/lang/python/django1/patches/001-load-byte-compiled-db-migrations.patch b/lang/python/django1/patches/001-load-byte-compiled-db-migrations.patch
new file mode 100644
index 0000000..e347e55
--- /dev/null
+++ b/lang/python/django1/patches/001-load-byte-compiled-db-migrations.patch
@@ -0,0 +1,11 @@
+--- 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)