Skip to content
This repository was archived by the owner on Dec 20, 2022. It is now read-only.

Commit 62cbe65

Browse files
committed
Put decimal separator detection into function
Avoids fixing separator to language
1 parent 97724fe commit 62cbe65

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

correctiv_justizgelder/templatetags/justizgelder_tags.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ def parse_query(query_string):
1919
return QueryDict(query_string.encode('ascii', 'ignore'), mutable=True)
2020

2121

22-
DECIMAL_SEPARATOR = floatformat(0.0, 2)[1]
23-
24-
2522
def add_embed(url):
2623
(scheme, netloc, path, query, fragment) = urlsplit(url)
2724
d = parse_query(query)
@@ -31,6 +28,8 @@ def add_embed(url):
3128

3229

3330
def intcomma_floatformat(value, arg):
31+
DECIMAL_SEPARATOR = floatformat(0.0, 2)[1]
32+
3433
val = intcomma(value)
3534
if DECIMAL_SEPARATOR not in val:
3635
val += '%s00' % DECIMAL_SEPARATOR

0 commit comments

Comments
 (0)