add mailaccount check
This commit is contained in:
@@ -129,12 +129,17 @@ class Member(models.Model):
|
|||||||
def clean(self):
|
def clean(self):
|
||||||
if self.image.height < 150 or self.image.width < 150:
|
if self.image.height < 150 or self.image.width < 150:
|
||||||
raise ValidationError(
|
raise ValidationError(
|
||||||
_('Das Bild ist zu klein. (Höhe: {}, Breite: {})').format(
|
_("Das Bild ist zu klein. (Höhe: {}, Breite: {})").format(
|
||||||
self.image.height,
|
self.image.height,
|
||||||
self.image.width
|
self.image.width
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not "@fet.at" in self.mailaccount:
|
||||||
|
raise ValidationError(
|
||||||
|
_("In der Mailadresse fehlt die Domäne.")
|
||||||
|
)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.firstname + " " + self.surname
|
return self.firstname + " " + self.surname
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user