From 55d92d9a73a195cc18e4eb3b0915e18d0955fee5 Mon Sep 17 00:00:00 2001 From: ainebyoonabridget Date: Fri, 23 Oct 2020 09:57:06 +0300 Subject: [PATCH] signup page --- accounts/forms.py | 6 +++++- templates/signup.html | 0 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 templates/signup.html diff --git a/accounts/forms.py b/accounts/forms.py index b7b8b2f..5f5a010 100644 --- a/accounts/forms.py +++ b/accounts/forms.py @@ -8,13 +8,17 @@ class SignUpForm(forms.ModelForm): + first_name = forms.CharField(max_length=30, required=False, help_text='Optional.') + last_name = forms.CharField(max_length=30, required=False, help_text='Optional.') + email = forms.CharField(max_length=254, help_text='Required. Inform a valid email address.') + phone_number = forms.CharField(max_length=15, required=False, help_text='Optional.') password1 = forms.CharField(label='Password', widget=forms.PasswordInput) password2 = forms.CharField( label='Password confirmation', widget=forms.PasswordInput) class Meta: model = User - fields = ['name', 'email', 'phone'] + fields = ('first_name', 'last_name', 'email','phone_number', 'password1', 'password2', ) def clean_password2(self): password1 = self.cleaned_data.get("password1") diff --git a/templates/signup.html b/templates/signup.html new file mode 100644 index 0000000..e69de29