Skip to content

signup page#37

Open
ainebyoonabridget wants to merge 1 commit intodevmedtz:mainfrom
ainebyoonabridget:authentication
Open

signup page#37
ainebyoonabridget wants to merge 1 commit intodevmedtz:mainfrom
ainebyoonabridget:authentication

Conversation

@ainebyoonabridget
Copy link
Copy Markdown

No description provided.

Comment thread accounts/forms.py


class SignUpForm(forms.ModelForm):
first_name = forms.CharField(max_length=30, required=False, help_text='Optional.')
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CustomUser model has no firstname field

Comment thread accounts/forms.py

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.')
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CustomUser model has no lastname field

Comment thread accounts/forms.py
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.')
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already defined in models

Comment thread accounts/forms.py
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.')
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already defined on models, Don't repeat yourself

Comment thread accounts/forms.py
class Meta:
model = User
fields = ['name', 'email', 'phone']
fields = ('first_name', 'last_name', 'email','phone_number', 'password1', 'password2', )
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fields should be a name, email, and phone, due to the CustomUser model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants