use django whitenoise for static files
This commit is contained in:
parent
b02efb06dd
commit
56b325ca10
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@ tags/
|
|||||||
*.egg-info/
|
*.egg-info/
|
||||||
.tox/
|
.tox/
|
||||||
.coverage
|
.coverage
|
||||||
|
staticfiles/
|
||||||
dr.botzo.data
|
dr.botzo.data
|
||||||
dr.botzo.cfg
|
dr.botzo.cfg
|
||||||
localsettings.py
|
localsettings.py
|
||||||
|
|||||||
@ -54,6 +54,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',
|
||||||
@ -165,6 +166,9 @@ BOOTSTRAP3 = {
|
|||||||
'javascript_in_head': True,
|
'javascript_in_head': True,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# whitenoise
|
||||||
|
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# web options #
|
# web options #
|
||||||
###############
|
###############
|
||||||
|
|||||||
@ -12,7 +12,7 @@ authors = [
|
|||||||
]
|
]
|
||||||
requires-python = ">=3.10,<3.12"
|
requires-python = ">=3.10,<3.12"
|
||||||
dependencies = ["Django<5.1", "django-bootstrap3", "django-extensions", "djangorestframework", "irc<20.5.0", "numexpr",
|
dependencies = ["Django<5.1", "django-bootstrap3", "django-extensions", "djangorestframework", "irc<20.5.0", "numexpr",
|
||||||
"parsedatetime", "ply", "python-dateutil", "python-mpd2", "pytz", "requests", "zalgo-text"]
|
"parsedatetime", "ply", "python-dateutil", "python-mpd2", "pytz", "requests", "whitenoise", "zalgo-text"]
|
||||||
dynamic = ["version"]
|
dynamic = ["version"]
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Framework :: Django",
|
"Framework :: Django",
|
||||||
|
|||||||
@ -283,6 +283,8 @@ virtualenv==20.27.1
|
|||||||
# via tox
|
# via tox
|
||||||
wheel==0.44.0
|
wheel==0.44.0
|
||||||
# via pip-tools
|
# via pip-tools
|
||||||
|
whitenoise==6.11.0
|
||||||
|
# via dr.botzo (pyproject.toml)
|
||||||
zalgo-text==0.6
|
zalgo-text==0.6
|
||||||
# via dr.botzo (pyproject.toml)
|
# via dr.botzo (pyproject.toml)
|
||||||
|
|
||||||
|
|||||||
@ -83,5 +83,7 @@ tempora==5.7.0
|
|||||||
# jaraco-logging
|
# jaraco-logging
|
||||||
urllib3==2.2.3
|
urllib3==2.2.3
|
||||||
# via requests
|
# via requests
|
||||||
|
whitenoise==6.11.0
|
||||||
|
# via dr.botzo (pyproject.toml)
|
||||||
zalgo-text==0.6
|
zalgo-text==0.6
|
||||||
# via dr.botzo (pyproject.toml)
|
# via dr.botzo (pyproject.toml)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user