We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99554ef commit 79195d9Copy full SHA for 79195d9
users/forms.py
@@ -0,0 +1,23 @@
1
+from django.contrib.auth.forms import UserCreationForm, UserChangeForm
2
+from django.contrib.auth.models import User
3
+from django import forms
4
+
5
6
7
8
9
+class UserRegisterForm(UserCreationForm):
10
+ class Meta:
11
+ model = User
12
+ fields = ('username', 'first_name', 'last_name', 'email')
13
14
+class UserUpdateForm(UserChangeForm):
15
+ password = None # не показываем поле пароля для редактирования
16
17
18
19
20
21
22
23
0 commit comments