8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-27 07:02:26 +00:00

32 caractères pour le login, et minuscules pour le dns

This commit is contained in:
chirac 2016-07-06 12:02:49 +02:00
parent 5eff4f7667
commit a58e90cc2f
2 changed files with 4 additions and 1 deletions

View file

@ -56,6 +56,9 @@ class Interface(models.Model):
def __str__(self):
return self.dns
def clean(self):
self.dns=self.dns.lower()
class IpList(models.Model):
ipv4 = models.GenericIPAddressField(protocol='IPv4', unique=True)

View file

@ -37,7 +37,7 @@ class User(models.Model):
name = models.CharField(max_length=255)
surname = models.CharField(max_length=255)
pseudo = models.CharField(max_length=255, unique=True, help_text="Doit contenir uniquement des lettres, chiffres, ou tirets", validators=[linux_user_validator])
pseudo = models.CharField(max_length=32, unique=True, help_text="Doit contenir uniquement des lettres, chiffres, ou tirets", validators=[linux_user_validator])
email = models.EmailField()
school = models.ForeignKey('School', on_delete=models.PROTECT, null=False, blank=False)
comment = models.CharField(help_text="Commentaire, promo", max_length=255, blank=True)