1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-07-06 06:03:54 +02:00

Django upgrade

This commit is contained in:
Alexandre Iooss
2019-08-10 10:44:17 +02:00
parent 80055771e9
commit a6dc8653af
19 changed files with 240 additions and 137 deletions

View File

@ -44,6 +44,12 @@ class UserCreationAdminForm(ModelForm):
from the given information.
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['email'].required = True
self.fields['first_name'].required = True
self.fields['last_name'].required = True
class Meta:
model = User
fields = ("username", "email", "first_name", "last_name", "address",