Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. class SignUp(CreateView):
  2. form_class = CustomUserCreationForm
  3. success_url = reverse_lazy('accounts:login')
  4. template_name = 'accounts/signup.html'
  5.  
  6. class CustomUserCreationForm(UserCreationForm):
  7. class Meta:
  8. fields = ('first_name', 'last_name', 'email', 'age', 'height', 'avatar', 'password1', 'password2')
  9. model = get_user_model()
  10.  
  11. def __init__(self, *args, **kwargs):
  12. super().__init__(*args, **kwargs)
  13. self.fields['password2'].label = "Confirm Password"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement