|
15 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
16 | 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
17 | 17 |
|
18 | | -SECRET_KEY = 'such-secret-much-hiding-wow' |
| 18 | +SECRET_KEY = "such-secret-much-hiding-wow" |
19 | 19 |
|
20 | 20 | # SECURITY WARNING: don't run with debug turned on in production! |
21 | 21 | DEBUG = True |
22 | 22 |
|
23 | | -ALLOWED_HOSTS = ['*'] |
| 23 | +ALLOWED_HOSTS = ["*"] |
24 | 24 |
|
25 | 25 |
|
26 | 26 | # Application definition |
27 | 27 |
|
28 | 28 | INSTALLED_APPS = [ |
29 | | - 'django.contrib.admin', |
30 | | - 'django.contrib.auth', |
31 | | - 'django.contrib.contenttypes', |
32 | | - 'django.contrib.sessions', |
33 | | - 'django.contrib.messages', |
34 | | - 'django.contrib.staticfiles', |
35 | | - |
36 | | - 'import_export', |
37 | | - 'timeline_logger', |
38 | | - |
39 | | - 'demo_app.apps.DemoAppConfig', |
| 29 | + "django.contrib.admin", |
| 30 | + "django.contrib.auth", |
| 31 | + "django.contrib.contenttypes", |
| 32 | + "django.contrib.sessions", |
| 33 | + "django.contrib.messages", |
| 34 | + "django.contrib.staticfiles", |
| 35 | + "import_export", |
| 36 | + "timeline_logger", |
| 37 | + "demo_app.apps.DemoAppConfig", |
40 | 38 | ] |
41 | 39 |
|
42 | 40 | MIDDLEWARE = [ |
43 | | - 'django.middleware.security.SecurityMiddleware', |
44 | | - 'django.contrib.sessions.middleware.SessionMiddleware', |
45 | | - 'django.middleware.common.CommonMiddleware', |
46 | | - 'django.middleware.csrf.CsrfViewMiddleware', |
47 | | - 'django.contrib.auth.middleware.AuthenticationMiddleware', |
48 | | - 'django.contrib.messages.middleware.MessageMiddleware', |
49 | | - 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
| 41 | + "django.middleware.security.SecurityMiddleware", |
| 42 | + "django.contrib.sessions.middleware.SessionMiddleware", |
| 43 | + "django.middleware.common.CommonMiddleware", |
| 44 | + "django.middleware.csrf.CsrfViewMiddleware", |
| 45 | + "django.contrib.auth.middleware.AuthenticationMiddleware", |
| 46 | + "django.contrib.messages.middleware.MessageMiddleware", |
| 47 | + "django.middleware.clickjacking.XFrameOptionsMiddleware", |
50 | 48 | ] |
51 | 49 |
|
52 | | -ROOT_URLCONF = 'demo.urls' |
| 50 | +ROOT_URLCONF = "demo.urls" |
53 | 51 |
|
54 | 52 | TEMPLATES = [ |
55 | 53 | { |
56 | | - 'BACKEND': 'django.template.backends.django.DjangoTemplates', |
57 | | - 'DIRS': [], |
58 | | - 'APP_DIRS': True, |
59 | | - 'OPTIONS': { |
60 | | - 'context_processors': [ |
61 | | - 'django.template.context_processors.debug', |
62 | | - 'django.template.context_processors.request', |
63 | | - 'django.contrib.auth.context_processors.auth', |
64 | | - 'django.contrib.messages.context_processors.messages', |
| 54 | + "BACKEND": "django.template.backends.django.DjangoTemplates", |
| 55 | + "DIRS": [], |
| 56 | + "APP_DIRS": True, |
| 57 | + "OPTIONS": { |
| 58 | + "context_processors": [ |
| 59 | + "django.template.context_processors.debug", |
| 60 | + "django.template.context_processors.request", |
| 61 | + "django.contrib.auth.context_processors.auth", |
| 62 | + "django.contrib.messages.context_processors.messages", |
65 | 63 | ], |
66 | 64 | }, |
67 | 65 | }, |
68 | 66 | ] |
69 | 67 |
|
70 | | -WSGI_APPLICATION = 'demo.wsgi.application' |
| 68 | +WSGI_APPLICATION = "demo.wsgi.application" |
71 | 69 |
|
72 | 70 |
|
73 | 71 | # Database |
74 | 72 | # https://docs.djangoproject.com/en/1.11/ref/settings/#databases |
75 | 73 |
|
76 | 74 | DATABASES = { |
77 | | - 'default': { |
78 | | - 'ENGINE': 'django.db.backends.postgresql', |
79 | | - 'NAME': os.getenv('PGDATABASE', 'timeline_logger'), |
80 | | - 'USER': os.getenv('PGUSER', 'postgres'), |
81 | | - 'PASSWORD': os.getenv('PGPASSWORD', ''), |
82 | | - 'HOST': os.getenv('PGHOST', ''), |
83 | | - 'PORT': os.getenv('PGPORT', 5432), |
| 75 | + "default": { |
| 76 | + "ENGINE": "django.db.backends.postgresql", |
| 77 | + "NAME": os.getenv("PGDATABASE", "timeline_logger"), |
| 78 | + "USER": os.getenv("PGUSER", "postgres"), |
| 79 | + "PASSWORD": os.getenv("PGPASSWORD", ""), |
| 80 | + "HOST": os.getenv("PGHOST", ""), |
| 81 | + "PORT": os.getenv("PGPORT", 5432), |
84 | 82 | } |
85 | 83 | } |
86 | 84 |
|
|
90 | 88 |
|
91 | 89 | AUTH_PASSWORD_VALIDATORS = [ |
92 | 90 | { |
93 | | - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', |
| 91 | + "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", |
94 | 92 | }, |
95 | 93 | { |
96 | | - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', |
| 94 | + "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", |
97 | 95 | }, |
98 | 96 | { |
99 | | - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', |
| 97 | + "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", |
100 | 98 | }, |
101 | 99 | { |
102 | | - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', |
| 100 | + "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", |
103 | 101 | }, |
104 | 102 | ] |
105 | 103 |
|
106 | 104 |
|
107 | 105 | # Internationalization |
108 | 106 | # https://docs.djangoproject.com/en/1.11/topics/i18n/ |
109 | 107 |
|
110 | | -LANGUAGE_CODE = 'en-us' |
| 108 | +LANGUAGE_CODE = "en-us" |
111 | 109 |
|
112 | | -TIME_ZONE = 'UTC' |
| 110 | +TIME_ZONE = "UTC" |
113 | 111 |
|
114 | 112 | USE_I18N = True |
115 | 113 |
|
|
121 | 119 | # Static files (CSS, JavaScript, Images) |
122 | 120 | # https://docs.djangoproject.com/en/1.11/howto/static-files/ |
123 | 121 |
|
124 | | -STATIC_URL = '/static/' |
| 122 | +STATIC_URL = "/static/" |
0 commit comments