summaryrefslogtreecommitdiff
path: root/backend/articles/forms.py
diff options
context:
space:
mode:
authorAndrew <saintruler@gmail.com>2019-03-11 21:00:02 +0400
committerAndrew <saintruler@gmail.com>2019-03-11 21:00:02 +0400
commit7e7dd5244e8d26485ad7950a89c04c98c4fef83f (patch)
tree810730c4650392080fb87a78d3b527201e89fe4b /backend/articles/forms.py
Initial commit/
Diffstat (limited to 'backend/articles/forms.py')
-rw-r--r--backend/articles/forms.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/backend/articles/forms.py b/backend/articles/forms.py
new file mode 100644
index 0000000..63444a1
--- /dev/null
+++ b/backend/articles/forms.py
@@ -0,0 +1,15 @@
+from django import forms
+from django.contrib.auth.forms import UserCreationForm, UserChangeForm
+from .models import User
+
+
+class CustomUserCreationForm(UserCreationForm):
+ class Meta(UserCreationForm):
+ model = User
+ fields = ('username', 'email')
+
+
+class CustomUserChangeForm(UserChangeForm):
+ class Meta:
+ model = User
+ fields = ('username', 'email')