}
kwargs.update(reverse_kwargs or {})
return 'http://%s%s' % (current_site.domain, self.reverse(confirmation_view, kwargs=kwargs, node=node))
-
- def get_context(self):
- """Hook for providing instance-specific context - such as the value of a Field - to all views."""
- return {}
def display_login_page(self, request, message, extra_context=None):
request.session.set_test_cookie()
return self.manage_account_page.render_to_response(request, extra_context=context)
def has_valid_account(self, user):
- user_form, profile_form = self.get_account_forms()
- forms = []
- forms.append(user_form(data=get_field_data(user, self.user_fields)))
-
- if profile_form is not None:
- profile = self.account_profile._default_manager.get_or_create(user=user)[0]
- forms.append(profile_form(data=get_field_data(profile, self.account_profile_fields)))
-
- for form in forms:
- if not form.is_valid():
- return False
- return True
+ form = self.account_form(user, {})
+ form.data = form.initial
+ return form.is_valid()
def account_required(self, view):
def inner(request, *args, **kwargs):