mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-02-25 06:26:30 +00:00
Compare commits
2 Commits
cce5e7c33c
...
cdf279bb02
Author | SHA1 | Date | |
---|---|---|---|
cdf279bb02 | |||
7515c2bec6 |
@ -20,7 +20,7 @@ class TeamForm(forms.ModelForm):
|
|||||||
"""
|
"""
|
||||||
def clean_name(self):
|
def clean_name(self):
|
||||||
if "name" in self.cleaned_data:
|
if "name" in self.cleaned_data:
|
||||||
name = self.cleaned_data["name"].upper()
|
name = self.cleaned_data["name"]
|
||||||
if not self.instance.pk and Team.objects.filter(name=name).exists():
|
if not self.instance.pk and Team.objects.filter(name=name).exists():
|
||||||
raise ValidationError(_("This name is already used."))
|
raise ValidationError(_("This name is already used."))
|
||||||
return name
|
return name
|
||||||
|
@ -190,6 +190,8 @@ MEDIA_URL = '/media/'
|
|||||||
|
|
||||||
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
|
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
|
||||||
|
|
||||||
|
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
|
||||||
|
|
||||||
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||||
|
|
||||||
DJANGO_TABLES2_TEMPLATE = 'django_tables2/bootstrap4.html'
|
DJANGO_TABLES2_TEMPLATE = 'django_tables2/bootstrap4.html'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user