diff --git a/TODO b/TODO new file mode 100644 index 0000000..57b7fb1 --- /dev/null +++ b/TODO @@ -0,0 +1,3 @@ +known bugs: + +html problem in mails: 14" -> 14" diff --git a/evapp/views.py b/evapp/views.py index 66a6fb4..f49fe82 100644 --- a/evapp/views.py +++ b/evapp/views.py @@ -58,7 +58,7 @@ class EvaFormView(CookieWizardView): data = self.get_all_cleaned_data() newdata = {k: v for k, v in data.items() if (k in MAILS[department]['DATA'])} - context = {'data': newdata} + context = {'data': self.beautify_data(newdata)} try: mail_template = get_template(f'evapp/{department}_mail.txt') @@ -90,7 +90,8 @@ class EvaFormView(CookieWizardView): and v in choices}) # replace values in accounts array from *_CHOICES - data['accounts'] = [ACCOUNT_CHOICES[c] for c in data['accounts']] + if 'accounts' in data: + data['accounts'] = [ACCOUNT_CHOICES[c] for c in data['accounts']] # replace keys in data dictionary with verbose_name