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:
@ -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}
|
||||
|
Reference in New Issue
Block a user