def get_context_data(self, *args, **kwargs): ctx = super(AccountRegistrationView, self).get_context_data(*args, **kwargs) ctx['cancel_url'] = safe_referrer(self.request, '') return ctx
def get_success_url(self): return safe_referrer(self.request, 'basket:summary')
def get_success_url(self, request): return safe_referrer(request, '.')
def get_success_url(self): post_url = self.request.POST.get('next') if post_url and is_safe_url(post_url, self.request.get_host()): return post_url return safe_referrer(self.request, 'basket:summary')
def get_error_url(self, request): return safe_referrer(request, '.')