1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-02-25 05:46:30 +00:00

Compare commits

...

2 Commits

2 changed files with 3 additions and 1 deletions

View File

@ -20,7 +20,7 @@ class TeamForm(forms.ModelForm):
"""
def clean_name(self):
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():
raise ValidationError(_("This name is already used."))
return name

View File

@ -190,6 +190,8 @@ MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
CRISPY_TEMPLATE_PACK = 'bootstrap4'
DJANGO_TABLES2_TEMPLATE = 'django_tables2/bootstrap4.html'