Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated docs for recent API change

  • Loading branch information...
commit f26907ad4ede1fd0a6a20bcc6d2bfd6fb97b39c7 1 parent 95c1bca
@brosner brosner authored
Showing with 10 additions and 10 deletions.
  1. +10 −10 docs/usage.rst
View
20 docs/usage.rst
@@ -36,12 +36,12 @@ defined in your project::
class SignupView(account.views.SignupView):
- def after_signup(self, user, form):
- self.create_profile(user, form)
- super(SignupView, self).after_signup(user, form)
+ def after_signup(self, form):
+ self.create_profile(form)
+ super(SignupView, self).after_signup(form)
- def create_profile(self, user, form):
- profile = user.get_profile()
+ def create_profile(self, form):
+ profile = self.created_user.get_profile()
profile.some_attr = "some value"
profile.save()
@@ -70,12 +70,12 @@ You can define your own form class to add fields to the sign up process::
form_class = myproject.forms.SignupForm
- def after_signup(self, user, form):
- self.create_profile(user, form)
- super(SignupView, self).after_signup(user, form)
+ def after_signup(self, form):
+ self.create_profile(form)
+ super(SignupView, self).after_signup(form)
- def create_profile(self, user, form):
- profile = user.get_profile()
+ def create_profile(self, form):
+ profile = self.created_user.get_profile()
profile.birthdate = form.cleaned_data["birthdate"]
profile.save()
Please sign in to comment.
Something went wrong with that request. Please try again.