Commit 0b416733 authored by BERJON Matthieu's avatar BERJON Matthieu

Update of the app settings

I updated several things:

- the allowed host in order to run the website in production mode.
- I added the compressor application to the list of available apps
- setup the `STATIC_ROOT` to give the compressor library the path where
are stored both the css and javascript files
- I setup the compressor library to be used at runtime
- I setup the preprocessor for the scss files
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
parent 596d9888
......@@ -25,7 +25,7 @@ SECRET_KEY = 'hv@@v0dt@@1^bhjbt!r0ovyz&4-+fj099825+tr4y)y5d#kely'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '[::1]']
# Application definition
......@@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'compressor',
'poc',
]
......@@ -121,5 +122,18 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.11/howto/static-files/
COMPRESS_ENABLED = True
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'djangobower.finders.BowerFinder', # add this
'compressor.finders.CompressorFinder', # add this
)
COMPRESS_PRECOMPILERS = (
('text/x-scss', 'django_libsass.SassCompiler'),
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment