-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakemigrations.py
41 lines (36 loc) · 921 Bytes
/
makemigrations.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import sys
import django
from django.conf import settings
from django.core.management import execute_from_command_line
MIGRATION_SETTINGS = {
"DEBUG": False,
"SECRET_KEY": "django-wm-fake-key",
"INSTALLED_APPS": [
"django.contrib.auth",
"django.contrib.contenttypes",
"mentions",
"sample_app",
# wagtail
"wagtail.users",
"wagtail",
"sample_app_wagtail",
"issues_app",
],
"DEFAULT_AUTO_FIELD": "django.db.models.BigAutoField",
"DOMAIN_NAME": "null.null",
"DATABASES": {
"default": {
"ENGINE": "django.db.backends.dummy",
}
},
}
if __name__ == "__main__":
settings.configure(**MIGRATION_SETTINGS)
django.setup()
args = sys.argv + [
"makemigrations",
"sample_app",
"sample_app_wagtail",
"issues_app",
]
execute_from_command_line(args)