mirror of
https://github.com/kennethreitz-archive/richtext.org.git
synced 2026-06-05 23:20:18 +00:00
dj static
This commit is contained in:
@@ -11,6 +11,7 @@ django = ">=2.0"
|
||||
"psycopg2" = "*"
|
||||
gunicorn = "*"
|
||||
dj-database-url = "*"
|
||||
whitenoise = "*"
|
||||
|
||||
|
||||
[dev-packages]
|
||||
|
||||
Generated
+8
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "9fb9e609349b328fe1246414709266a39ab7efd41ba133bfda4076c00b39c133"
|
||||
"sha256": "5da72a6548823b17ea8716c4c617ea7b612285f4c830b6950bf59edba6e1b005"
|
||||
},
|
||||
"host-environment-markers": {
|
||||
"implementation_name": "cpython",
|
||||
@@ -97,6 +97,13 @@
|
||||
"sha256:fae4cffc040921b8a2d60c6cf0b5d662c1190fe54d718271db4eb17d44a185b7"
|
||||
],
|
||||
"version": "==2017.3"
|
||||
},
|
||||
"whitenoise": {
|
||||
"hashes": [
|
||||
"sha256:15f43b2e701821b95c9016cf469d29e2a546cb1c7dead584ba82c36f843995cf",
|
||||
"sha256:9d81515f2b5b27051910996e1e860b1332e354d9e7bcf30c98f21dcb6713e0dd"
|
||||
],
|
||||
"version": "==3.3.1"
|
||||
}
|
||||
},
|
||||
"develop": {}
|
||||
|
||||
@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/2.0/ref/settings/
|
||||
"""
|
||||
|
||||
import os
|
||||
import dj_database_url
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
@@ -41,6 +42,9 @@ INSTALLED_APPS = [
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
# Simplified static file serving.
|
||||
# https://warehouse.python.org/project/whitenoise/
|
||||
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
@@ -114,4 +118,19 @@ USE_TZ = True
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/2.0/howto/static-files/
|
||||
|
||||
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/1.9/howto/static-files/
|
||||
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles')
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
# Extra places for collectstatic to find static files.
|
||||
STATICFILES_DIRS = (
|
||||
os.path.join(PROJECT_ROOT, 'static'),
|
||||
)
|
||||
|
||||
# Simplified static file serving.
|
||||
# https://warehouse.python.org/project/whitenoise/
|
||||
|
||||
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
||||
|
||||
Reference in New Issue
Block a user