diff --git a/app/apps/common/templatetags/formats.py b/app/apps/common/templatetags/formats.py new file mode 100644 index 0000000..9a3492c --- /dev/null +++ b/app/apps/common/templatetags/formats.py @@ -0,0 +1,17 @@ +from django import template +from django.utils.formats import get_format + + +register = template.Library() + + +@register.simple_tag +def get_thousand_separator(): + print(get_format("THOUSAND_SEPARATOR")) + return get_format("THOUSAND_SEPARATOR") + + +@register.simple_tag +def get_decimal_separator(): + print(get_format("DECIMAL_SEPARATOR")) + return get_format("DECIMAL_SEPARATOR") diff --git a/app/templates/includes/navbar.html b/app/templates/includes/navbar.html index c03b369..79620d8 100644 --- a/app/templates/includes/navbar.html +++ b/app/templates/includes/navbar.html @@ -126,7 +126,15 @@
diff --git a/app/templates/layouts/base.html b/app/templates/layouts/base.html index c2538da..63d3395 100644 --- a/app/templates/layouts/base.html +++ b/app/templates/layouts/base.html @@ -1,3 +1,4 @@ +{% load formats %} {% load i18n %} {% load title %} {% load webpack_loader %} @@ -19,6 +20,8 @@ {% block extra_styles %}{% endblock %} {% include 'includes/scripts.html' %} + + {% block extra_js_head %}{% endblock %} @@ -34,7 +37,93 @@ {% include 'includes/offcanvas.html' %} {% include 'includes/toasts.html' %} - + +