new FT test_theme for theme switcher functionality; theme-switcher content added to home.html, several dashboard views & urls, all appropriate ITs & UTs; lyric user model saves theme (migrations run); django-compressor and django-libsass libraries added to dependencies
This commit is contained in:
4
src/core/context_processors.py
Normal file
4
src/core/context_processors.py
Normal file
@@ -0,0 +1,4 @@
|
||||
def user_theme(request):
|
||||
if request.user.is_authenticated:
|
||||
return {"user_theme": request.user.theme}
|
||||
return {"user_theme": "theme-default"}
|
||||
@@ -57,6 +57,7 @@ INSTALLED_APPS = [
|
||||
'apps.api',
|
||||
'functional_tests',
|
||||
# Depend apps
|
||||
'compressor',
|
||||
'rest_framework',
|
||||
]
|
||||
|
||||
@@ -86,6 +87,7 @@ TEMPLATES = [
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'core.context_processors.user_theme',
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -167,6 +169,14 @@ STATIC_ROOT = BASE_DIR / 'static'
|
||||
STATICFILES_DIRS = [
|
||||
BASE_DIR / 'static_src',
|
||||
]
|
||||
STATICFILES_FINDERS = [
|
||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||
'compressor.finders.CompressorFinder',
|
||||
]
|
||||
COMPRESS_PRECOMPILERS = [
|
||||
('text/x-scss', 'django_libsass.SassCompiler'),
|
||||
]
|
||||
|
||||
LOGGING = {
|
||||
"version": 1,
|
||||
|
||||
Reference in New Issue
Block a user