-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wash list of theme names #226
base: main
Are you sure you want to change the base?
Conversation
ff317cc
to
b00e6d3
Compare
34c422e
to
e77e0c8
Compare
src/argus_htmx/themes/utils.py
Outdated
DATA_THEME_RE = f"\[data-theme={THEME_NAME_RE}\]" | ||
|
||
static_url = Path(settings.STATIC_URL).relative_to("/") | ||
stylesheet_path = static_url / default_htmx_settings.STYLESHEET_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to look at the django.conf.settings since it might be overridden in another settings file (we do this)
src/argus_htmx/themes/utils.py
Outdated
def get_theme_default(): | ||
return getattr(settings, "THEME_DEFAULT", argus_htmx_settings.THEME_DEFAULT) | ||
return getattr(settings, "THEME_DEFAULT", default_htmx_settings.THEME_DEFAULT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should also look at django.conf.settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It already does. default_htmx_settings.THEME_DEFAULT
is the fallback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have renamed "default_htmx_settings" to "fallbacks".
Ensure that the themes shown in the theme-selector are actually installed.