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:
Disco DeDisco
2026-03-02 13:57:03 -05:00
parent 143e81fc41
commit e142e5d4d7
14 changed files with 624 additions and 3 deletions

View 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"}

View File

@@ -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,