diff --git a/amadeus/templates/base.html b/amadeus/templates/base.html index 07f5610..d402ece 100644 --- a/amadeus/templates/base.html +++ b/amadeus/templates/base.html @@ -1,7 +1,6 @@ -{% load static i18n %} -{% load static i18n permission_tags django_bootstrap_breadcrumbs %} +{% load static i18n django_bootstrap_breadcrumbs css_theme %} {% get_current_language as LANGUAGE_CODE %} @@ -47,7 +46,7 @@ - + @@ -60,6 +59,7 @@ + {% css_theme %} diff --git a/amadeus/templates/css_theme.html b/amadeus/templates/css_theme.html new file mode 100644 index 0000000..ae0a0a7 --- /dev/null +++ b/amadeus/templates/css_theme.html @@ -0,0 +1,5 @@ +{% load static %} + +{% with 'css/themes/'|add:theme|add:'.css' as theme_selected %} + +{% endwith %} \ No newline at end of file diff --git a/amadeus/templatetags/css_theme.py b/amadeus/templatetags/css_theme.py new file mode 100644 index 0000000..55ac00c --- /dev/null +++ b/amadeus/templatetags/css_theme.py @@ -0,0 +1,15 @@ +from django import template + +from themes.models import Themes + +register = template.Library() + +@register.inclusion_tag('css_theme.html') +def css_theme(): + theme = Themes.objects.get(id = 1) + + context = { + 'theme': theme.css_style + } + + return context \ No newline at end of file -- libgit2 0.21.2