Exclude all kinds of Umlauts from GiroCodes (Fix: #1314)

This commit is contained in:
Martin Gross
2020-04-17 19:14:54 +02:00
parent 0783add3b9
commit 1d8668aaf1
4 changed files with 15 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
import text_unidecode
from django import template
register = template.Library()
@register.filter
def unidecode(value):
return text_unidecode.unidecode(str(value))

View File

@@ -4,6 +4,7 @@
{% load dotdecimal %} {% load dotdecimal %}
{% load ibanformat %} {% load ibanformat %}
{% load money %} {% load money %}
{% load unidecode %}
<p>{% blocktrans trimmed %} <p>{% blocktrans trimmed %}
Please transfer the full amount to the following bank account: Please transfer the full amount to the following bank account:
@@ -43,7 +44,7 @@
2 2
SCT SCT
{{ settings.bank_details_sepa_bic }} {{ settings.bank_details_sepa_bic }}
{{ settings.bank_details_sepa_name }} {{ settings.bank_details_sepa_name|unidecode }}
{{ settings.bank_details_sepa_iban }} {{ settings.bank_details_sepa_iban }}
{{ event.currency }}{{ amount|dotdecimal }} {{ event.currency }}{{ amount|dotdecimal }}

View File

@@ -64,4 +64,5 @@ phonenumberslite==8.11.*
python-bidi==0.4.* # Support for arabic in reportlab python-bidi==0.4.* # Support for arabic in reportlab
arabic-reshaper==2.0.15 # Support for Aabic in reportlab arabic-reshaper==2.0.15 # Support for Aabic in reportlab
packaging packaging
tlds>=2020041600 tlds>=2020041600
text-unidecode==1.*

View File

@@ -151,7 +151,8 @@ setup(
'python-bidi==0.4.*', # Support for Arabic in reportlab 'python-bidi==0.4.*', # Support for Arabic in reportlab
'arabic-reshaper==2.0.15', # Support for Arabic in reportlab 'arabic-reshaper==2.0.15', # Support for Arabic in reportlab
'packaging', 'packaging',
'tlds>=2020041600' 'tlds>=2020041600',
'text-unidecode==1.*'
], ],
extras_require={ extras_require={
'dev': [ 'dev': [