|
19 | 19 | # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ |
20 | 20 |
|
21 | 21 | # SECURITY WARNING: keep the secret key used in production secret! |
22 | | -SECRET_KEY = 'django-insecure-5521h6qe4_$3azghmhg)@t@--fq-)+2cx072i166)rp6nwo#f#' |
| 22 | +SECRET_KEY = "django-insecure-5521h6qe4_$3azghmhg)@t@--fq-)+2cx072i166)rp6nwo#f#" |
23 | 23 |
|
24 | 24 | # SECURITY WARNING: don't run with debug turned on in production! |
25 | 25 | DEBUG = True |
|
29 | 29 | # Application definition |
30 | 30 |
|
31 | 31 | INSTALLED_APPS = [ |
32 | | - 'django.contrib.admin', |
33 | | - 'django.contrib.auth', |
34 | | - 'django.contrib.contenttypes', |
35 | | - 'django.contrib.sessions', |
36 | | - 'django.contrib.messages', |
37 | | - 'django.contrib.staticfiles', |
38 | | - 'crispy_forms', |
39 | | - 'galleryfield', |
40 | | - 'sorl.thumbnail', |
41 | | - 'demo', |
| 32 | + "django.contrib.admin", |
| 33 | + "django.contrib.auth", |
| 34 | + "django.contrib.contenttypes", |
| 35 | + "django.contrib.sessions", |
| 36 | + "django.contrib.messages", |
| 37 | + "django.contrib.staticfiles", |
| 38 | + "crispy_forms", |
| 39 | + "galleryfield", |
| 40 | + "sorl.thumbnail", |
| 41 | + "demo", |
42 | 42 | ] |
43 | 43 |
|
44 | 44 | MIDDLEWARE = [ |
45 | | - 'django.middleware.security.SecurityMiddleware', |
46 | | - 'django.contrib.sessions.middleware.SessionMiddleware', |
47 | | - 'django.middleware.common.CommonMiddleware', |
48 | | - 'django.middleware.csrf.CsrfViewMiddleware', |
49 | | - 'django.contrib.auth.middleware.AuthenticationMiddleware', |
50 | | - 'django.contrib.messages.middleware.MessageMiddleware', |
51 | | - 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
| 45 | + "django.middleware.security.SecurityMiddleware", |
| 46 | + "django.contrib.sessions.middleware.SessionMiddleware", |
| 47 | + "django.middleware.common.CommonMiddleware", |
| 48 | + "django.middleware.csrf.CsrfViewMiddleware", |
| 49 | + "django.contrib.auth.middleware.AuthenticationMiddleware", |
| 50 | + "django.contrib.messages.middleware.MessageMiddleware", |
| 51 | + "django.middleware.clickjacking.XFrameOptionsMiddleware", |
52 | 52 | ] |
53 | 53 |
|
54 | | -ROOT_URLCONF = 'demo.urls' |
| 54 | +ROOT_URLCONF = "demo.urls" |
55 | 55 |
|
56 | 56 | TEMPLATES = [ |
57 | 57 | { |
58 | | - 'BACKEND': 'django.template.backends.django.DjangoTemplates', |
59 | | - 'DIRS': [], |
60 | | - 'APP_DIRS': True, |
61 | | - 'OPTIONS': { |
62 | | - 'context_processors': [ |
63 | | - 'django.template.context_processors.debug', |
64 | | - 'django.template.context_processors.request', |
65 | | - 'django.contrib.auth.context_processors.auth', |
66 | | - 'django.contrib.messages.context_processors.messages', |
| 58 | + "BACKEND": "django.template.backends.django.DjangoTemplates", |
| 59 | + "DIRS": [], |
| 60 | + "APP_DIRS": True, |
| 61 | + "OPTIONS": { |
| 62 | + "context_processors": [ |
| 63 | + "django.template.context_processors.debug", |
| 64 | + "django.template.context_processors.request", |
| 65 | + "django.contrib.auth.context_processors.auth", |
| 66 | + "django.contrib.messages.context_processors.messages", |
67 | 67 | ], |
68 | 68 | }, |
69 | 69 | }, |
70 | 70 | ] |
71 | 71 |
|
72 | | -WSGI_APPLICATION = 'demo.wsgi.application' |
| 72 | +WSGI_APPLICATION = "demo.wsgi.application" |
73 | 73 |
|
74 | 74 | # Database |
75 | 75 | # https://docs.djangoproject.com/en/3.2/ref/settings/#databases |
76 | 76 |
|
77 | 77 | DATABASES = { |
78 | | - 'default': { |
79 | | - 'ENGINE': 'django.db.backends.sqlite3', |
80 | | - 'NAME': BASE_DIR / 'django_galleryfield_db.sqlite3', |
| 78 | + "default": { |
| 79 | + "ENGINE": "django.db.backends.sqlite3", |
| 80 | + "NAME": BASE_DIR / "django_galleryfield_db.sqlite3", |
81 | 81 | } |
82 | 82 | } |
83 | 83 |
|
|
86 | 86 |
|
87 | 87 | AUTH_PASSWORD_VALIDATORS = [ |
88 | 88 | { |
89 | | - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', # noqa |
| 89 | + "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", # noqa |
90 | 90 | }, |
91 | 91 | { |
92 | | - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', |
| 92 | + "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", |
93 | 93 | }, |
94 | 94 | { |
95 | | - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', |
| 95 | + "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", |
96 | 96 | }, |
97 | 97 | { |
98 | | - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', |
| 98 | + "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", |
99 | 99 | }, |
100 | 100 | ] |
101 | 101 |
|
102 | 102 | # Internationalization |
103 | 103 | # https://docs.djangoproject.com/en/3.2/topics/i18n/ |
104 | 104 |
|
105 | | -LANGUAGE_CODE = 'en-us' |
| 105 | +LANGUAGE_CODE = "en-us" |
106 | 106 |
|
107 | | -TIME_ZONE = 'UTC' |
| 107 | +TIME_ZONE = "UTC" |
108 | 108 |
|
109 | 109 | USE_I18N = True |
110 | 110 |
|
|
115 | 115 | # Static files (CSS, JavaScript, Images) |
116 | 116 | # https://docs.djangoproject.com/en/3.2/howto/static-files/ |
117 | 117 |
|
118 | | -STATIC_URL = '/static/' |
119 | | -MEDIA_ROOT = BASE_DIR / 'media/' |
| 118 | +STATIC_URL = "/static/" |
| 119 | +MEDIA_ROOT = BASE_DIR / "media/" |
120 | 120 | MEDIA_URL = "media/" |
121 | 121 |
|
122 | 122 | # Default primary key field type |
123 | 123 | # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field |
124 | 124 |
|
125 | | -DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' |
| 125 | +DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" |
126 | 126 |
|
127 | | -CRISPY_TEMPLATE_PACK = 'bootstrap4' |
| 127 | +CRISPY_TEMPLATE_PACK = "bootstrap4" |
128 | 128 |
|
129 | 129 | # DJANGO_GALLERY_FIELD_CONFIG = { |
130 | 130 | # |
|
134 | 134 |
|
135 | 135 | from django.conf.global_settings import STATICFILES_FINDERS |
136 | 136 |
|
137 | | -STATICFILES_FINDERS = tuple(STATICFILES_FINDERS) + ( |
138 | | - "npm.finders.NpmFinder",) |
| 137 | +STATICFILES_FINDERS = tuple(STATICFILES_FINDERS) + ("npm.finders.NpmFinder",) |
0 commit comments