|
11 | 11 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
12 | 12 | # SETTINGS_DIR is where this settings file is
|
13 | 13 | SETTINGS_DIR = os.path.dirname(os.path.abspath(__file__))
|
14 |
| -# PROJECT_DIR is the directory under root that contains the settings directory, urls.py, and other global stuff. |
| 14 | +# PROJECT_DIR is the directory under root that contains the settings directory, |
| 15 | +# urls.py, and other global stuff. |
15 | 16 | PROJECT_DIR = os.path.dirname(SETTINGS_DIR)
|
16 | 17 | # ROOT_DIR is the top directory under source control
|
17 | 18 | ROOT_DIR = os.path.dirname(PROJECT_DIR)
|
|
92 | 93 | LOGGING = {
|
93 | 94 | "version": 1,
|
94 | 95 | "disable_existing_loggers": False,
|
95 |
| - "filters": {"require_debug_false": {"()": "django.utils.log.RequireDebugFalse"}}, |
| 96 | + "filters": { |
| 97 | + "require_debug_false": {"()": "django.utils.log.RequireDebugFalse"} |
| 98 | + }, |
96 | 99 | "formatters": {
|
97 | 100 | "basic": {
|
98 | 101 | "format": "%(asctime)s %(name)-20s %(levelname)-8s %(message)s",
|
|
202 | 205 | # https://docs.djangoproject.com/en/1.9/topics/auth/passwords/#password-validation
|
203 | 206 | AUTH_PASSWORD_VALIDATORS = [
|
204 | 207 | {
|
205 |
| - "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", |
| 208 | + "NAME": ( |
| 209 | + "django.contrib.auth." |
| 210 | + "password_validation.UserAttributeSimilarityValidator" |
| 211 | + ), |
206 | 212 | },
|
207 | 213 | {
|
208 |
| - "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", |
| 214 | + "NAME": ( |
| 215 | + "django.contrib.auth.password_validation.MinimumLengthValidator" |
| 216 | + ), |
209 | 217 | },
|
210 | 218 | {
|
211 |
| - "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", |
| 219 | + "NAME": ( |
| 220 | + "django.contrib.auth." |
| 221 | + "password_validation.CommonPasswordValidator" |
| 222 | + ), |
212 | 223 | },
|
213 | 224 | {
|
214 |
| - "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", |
| 225 | + "NAME": ( |
| 226 | + "django.contrib.auth." |
| 227 | + "password_validation.NumericPasswordValidator" |
| 228 | + ), |
215 | 229 | },
|
216 | 230 | ]
|
217 | 231 |
|
218 | 232 | # Make things more secure by default. Run "python manage.py check --deploy"
|
219 |
| -# for even more suggestions that you might want to add to the settings, depending |
220 |
| -# on how the site uses SSL. |
| 233 | +# for even more suggestions that you might want to add to the settings, |
| 234 | +# depending on how the site uses SSL. |
221 | 235 | SECURE_CONTENT_TYPE_NOSNIFF = True
|
222 | 236 | SECURE_BROWSER_XSS_FILTER = True
|
223 | 237 | CSRF_COOKIE_HTTPONLY = True
|
|
244 | 258 | # Percent translated that languages should be at or above
|
245 | 259 | TRANSLATION_THRESHOLD = 80
|
246 | 260 |
|
247 |
| -# Location of the translation data's repo. Look in env for TRANSLATION_REPOSITORY_DIRECTORY. |
| 261 | +# Location of the translation data's repo. Look in env for |
| 262 | +# TRANSLATION_REPOSITORY_DIRECTORY. |
248 | 263 | # Default is next to this one.
|
249 | 264 | TRANSLATION_REPOSITORY_DIRECTORY = os.getenv(
|
250 |
| - "TRANSLATION_REPOSITORY_DIRECTORY", os.path.join(ROOT_DIR, "..", "cc-licenses-data") |
| 265 | + "TRANSLATION_REPOSITORY_DIRECTORY", |
| 266 | + os.path.join(ROOT_DIR, "..", "cc-licenses-data"), |
251 | 267 | )
|
252 | 268 |
|
253 | 269 | # django-distill settings
|
254 | 270 | DISTILL_DIR = f"{TRANSLATION_REPOSITORY_DIRECTORY}/build/"
|
255 | 271 |
|
256 | 272 | # Django translations are in the translation repo directory, under "locale".
|
257 |
| -# License translations are in the translation repo directory, under "translations". |
| 273 | +# License translations are in the translation repo directory, under |
| 274 | +# "translations". |
258 | 275 | LOCALE_PATHS = (
|
259 | 276 | os.path.join(TRANSLATION_REPOSITORY_DIRECTORY, "locale"),
|
260 | 277 | os.path.join(TRANSLATION_REPOSITORY_DIRECTORY, "legalcode"),
|
|
266 | 283 | "API_TOKEN": os.getenv("TRANSIFEX_API_TOKEN", "missing"),
|
267 | 284 | }
|
268 | 285 |
|
269 |
| -# The git branch where the official, approved, used in production translations are. |
| 286 | +# The git branch where the official, approved, used in production translations |
| 287 | +# are. |
270 | 288 | OFFICIAL_GIT_BRANCH = "develop"
|
271 | 289 |
|
272 | 290 | # Path to private keyfile to use when pushing up to data repo
|
273 |
| -TRANSLATION_REPOSITORY_DEPLOY_KEY = os.getenv("TRANSLATION_REPOSITORY_DEPLOY_KEY", "") |
| 291 | +TRANSLATION_REPOSITORY_DEPLOY_KEY = os.getenv( |
| 292 | + "TRANSLATION_REPOSITORY_DEPLOY_KEY", "" |
| 293 | +) |
0 commit comments