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

Remove custom add user view

This commit is contained in:
Alexandre Iooss
2019-08-09 22:52:47 +02:00
parent de9650d33a
commit d1806fd727
6 changed files with 29 additions and 38 deletions

View File

@ -3,6 +3,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
from django import forms
from django.contrib.auth.forms import UsernameField
from django.core.validators import MinLengthValidator
from django.forms import ModelForm
@ -35,3 +36,16 @@ class BaseInfoForm(ModelForm):
'address',
'telephone',
]
class UserCreationAdminForm(ModelForm):
"""
A form that creates a user, with no privileges,
from the given information.
"""
class Meta:
model = User
fields = ("username", "email", "first_name", "last_name", "address",
"telephone")
field_classes = {'username': UsernameField}