kers/users/forms.py

16 lines
427 B
Python
Raw Normal View History

2020-07-22 00:52:02 +02:00
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from .models import CustomUser
class CustomUserCreationForm(UserCreationForm):
class Meta(UserCreationForm):
model = CustomUser
2020-07-22 05:03:01 +02:00
fields = ('username', 'student_number', 'real_name',)
2020-07-22 00:52:02 +02:00
class CustomUserChangeForm(UserChangeForm):
class Meta:
model = CustomUser
2020-07-22 05:03:01 +02:00
fields = ('username', 'student_number', 'real_name',)