Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SignUp(CreateView):
- form_class = CustomUserCreationForm
- success_url = reverse_lazy('accounts:login')
- template_name = 'accounts/signup.html'
- class CustomUserCreationForm(UserCreationForm):
- class Meta:
- fields = ('first_name', 'last_name', 'email', 'age', 'height', 'avatar', 'password1', 'password2')
- model = get_user_model()
- def __init__(self, *args, **kwargs):
- super().__init__(*args, **kwargs)
- self.fields['password2'].label = "Confirm Password"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement