chol
/
eva
forked from tohe/eva
1
0
Fork 0

more beauty again! replace account codes with long names

This commit is contained in:
Benni Bärmann 2021-01-19 10:06:29 +01:00
parent 93f31fbaa0
commit aa64972fff
1 changed files with 4 additions and 0 deletions

View File

@ -89,6 +89,10 @@ class EvaFormView(CookieWizardView):
if isinstance(v,collections.abc.Hashable) \
and v in choices})
# replace values in accounts array from *_CHOICES
data['accounts'] = [ACCOUNT_CHOICES[c] for c in data['accounts']]
# replace keys in data dictionary with verbose_name
newdata = {self.instance._meta.get_field(k).verbose_name.title() : v for k,v in data.items()}