Advertisement
Guest User

Untitled

a guest
Apr 4th, 2020
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. def form_valid(self, form):
  2.         # By assigning the User to a property on the view, we allow subclasses
  3.         # of SignupView to access the newly created User instance
  4.         self.user = form.save(self.request)
  5.         try:
  6.             return complete_signup(
  7.                 self.request, self.user,
  8.                 app_settings.EMAIL_VERIFICATION,
  9.                 self.get_success_url())
  10.         except ImmediateHttpResponse as e:
  11.             return e.response
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement