mirror of
https://github.com/Rushilwiz/tj2023.git
synced 2025-04-09 14:50:17 -04:00
added whitenoise support for staticfiles
This commit is contained in:
parent
55712e8cbf
commit
0576e8ca53
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,10 +1,11 @@
|
||||||
led / optimized / DLL files
|
#led / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
*$py.class
|
*$py.class
|
||||||
secrets.py
|
secrets.py
|
||||||
static_files
|
static_files
|
||||||
.idea/
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
|
||||||
# C extensions
|
# C extensions
|
||||||
*.so
|
*.so
|
||||||
|
@ -64,6 +65,7 @@ local_settings.py
|
||||||
db.sqlite3
|
db.sqlite3
|
||||||
db.sqlite3-journal
|
db.sqlite3-journal
|
||||||
|
|
||||||
|
|
||||||
# Flask stuff:
|
# Flask stuff:
|
||||||
instance/
|
instance/
|
||||||
.webassets-cache
|
.webassets-cache
|
||||||
|
|
|
@ -45,6 +45,7 @@ INSTALLED_APPS = [
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
|
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
|
@ -124,5 +125,4 @@ USE_TZ = True
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
|
|
||||||
import os
|
import os
|
||||||
STATIC_ROOT = os.path.join(BASE_DIR, 'static_files')
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
||||||
STATICFILES_DIRS = [BASE_DIR / "static"]
|
|
|
@ -10,6 +10,7 @@ Django==3.1.2
|
||||||
django-extensions==3.0.9
|
django-extensions==3.0.9
|
||||||
django-secrets==1.0.2
|
django-secrets==1.0.2
|
||||||
future==0.18.2
|
future==0.18.2
|
||||||
|
gunicorn==20.0.4
|
||||||
idna==2.10
|
idna==2.10
|
||||||
notion==0.0.25
|
notion==0.0.25
|
||||||
python-slugify==4.0.1
|
python-slugify==4.0.1
|
||||||
|
@ -21,3 +22,4 @@ sqlparse==0.4.1
|
||||||
text-unidecode==1.3
|
text-unidecode==1.3
|
||||||
tzlocal==2.1
|
tzlocal==2.1
|
||||||
urllib3==1.25.11
|
urllib3==1.25.11
|
||||||
|
whitenoise==5.2.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user