1
- """
2
- Django settings for finance project.
3
-
4
- Generated by 'django-admin startproject' using Django 3.2.7.
5
-
6
- For more information on this file, see
7
- https://docs.djangoproject.com/en/3.2/topics/settings/
8
-
9
- For the full list of settings and their values, see
10
- https://docs.djangoproject.com/en/3.2/ref/settings/
11
- """
12
-
1
+ import django_heroku
13
2
from pathlib import Path
3
+ import os
14
4
15
5
# Build paths inside the project like this: BASE_DIR / 'subdir'.
16
6
BASE_DIR = Path (__file__ ).resolve ().parent .parent
51
41
'django.contrib.sessions.middleware.SessionMiddleware' ,
52
42
'django.middleware.common.CommonMiddleware' ,
53
43
'django.middleware.csrf.CsrfViewMiddleware' ,
44
+ 'whitenoise.middleware.WhiteNoiseMiddleware' ,
54
45
'django.contrib.auth.middleware.AuthenticationMiddleware' ,
55
46
'django.contrib.messages.middleware.MessageMiddleware' ,
56
47
'django.middleware.clickjacking.XFrameOptionsMiddleware' ,
151
142
# Static files (CSS, JavaScript, Images)
152
143
# https://docs.djangoproject.com/en/3.2/howto/static-files/
153
144
145
+ BASE_DIR = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
146
+
147
+ # Static files (CSS, JavaScript, Images)
148
+ # https://docs.djangoproject.com/en/1.9/howto/static-files/
149
+ STATIC_ROOT = os .path .join (BASE_DIR , 'staticfiles' )
154
150
STATIC_URL = '/static/'
151
+
152
+ # Extra places for collectstatic to find static files.
153
+ STATICFILES_DIRS = (
154
+ os .path .join (BASE_DIR , 'static' ),
155
+ )
155
156
# Default primary key field type
156
157
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
157
158
171
172
172
173
api_key = 'Tpk_c46f4087296c43358402984f3b26ed2f'
173
174
174
- X_FRAME_OPTIONS = 'SAMEORIGIN'
175
+ X_FRAME_OPTIONS = 'SAMEORIGIN'
176
+ django_heroku .settings (locals ())
0 commit comments