mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-24 17:48:41 +02:00
feat: add contained, persistent calculator
This commit is contained in:
17
app/apps/common/templatetags/formats.py
Normal file
17
app/apps/common/templatetags/formats.py
Normal file
@@ -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")
|
||||
Reference in New Issue
Block a user