Compare commits

...

3 Commits

3 changed files with 72 additions and 1 deletions

View File

@ -0,0 +1,68 @@
# Generated by Django 3.1.1 on 2020-11-16 15:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('input', '0043_auto_20201102_1320'),
]
operations = [
migrations.AlterField(
model_name='businesscard',
name='email',
field=models.EmailField(max_length=200, null=True, verbose_name='E-Mail-Adresse'),
),
migrations.AlterField(
model_name='email',
name='email',
field=models.EmailField(max_length=200, null=True, verbose_name='E-Mail-Adresse'),
),
migrations.AlterField(
model_name='honorarycertificate',
name='email',
field=models.EmailField(max_length=200, null=True, verbose_name='E-Mail-Adresse'),
),
migrations.AlterField(
model_name='ifg',
name='email',
field=models.EmailField(max_length=200, null=True, verbose_name='E-Mail-Adresse'),
),
migrations.AlterField(
model_name='library',
name='email',
field=models.EmailField(max_length=200, null=True, verbose_name='E-Mail-Adresse'),
),
migrations.AlterField(
model_name='list',
name='email',
field=models.EmailField(max_length=200, null=True, verbose_name='E-Mail-Adresse'),
),
migrations.AlterField(
model_name='literature',
name='email',
field=models.EmailField(max_length=200, null=True, verbose_name='E-Mail-Adresse'),
),
migrations.AlterField(
model_name='literature',
name='info',
field=models.CharField(max_length=500, verbose_name='Informationen zum Werk'),
),
migrations.AlterField(
model_name='literature',
name='source',
field=models.CharField(max_length=200, verbose_name='Bezugsquelle'),
),
migrations.AlterField(
model_name='project',
name='email',
field=models.EmailField(max_length=200, null=True, verbose_name='E-Mail-Adresse'),
),
migrations.AlterField(
model_name='travel',
name='email',
field=models.EmailField(max_length=200, null=True, verbose_name='E-Mail-Adresse'),
),
]

View File

@ -7,7 +7,7 @@ from .settings import ACCOUNTS
class Volunteer(models.Model):
realname = models.CharField(max_length=200, null=True, verbose_name="Name / Hauptansprechperson")
email = models.CharField(max_length=200, null=True, verbose_name='E-Mail-Adresse')
email = models.EmailField(max_length=200, null=True, verbose_name='E-Mail-Adresse')
# the following Fields are not supposed to be edited by users
granted = models.BooleanField(null=True)

View File

@ -192,10 +192,13 @@ class ExternView(CookieWizardView):
IF_EMAIL,
[IF_EMAIL],
fail_silently=False)
# raise SMTPException("testing pupose only")
except BadHeaderError:
modell.delete()
return HttpResponse('Invalid header found. Data not saved!')
except SMTPException:
modell.delete()
return HttpResponse('Error in sending mails (propably wrong adress?). Data not saved!')