예제 #1
0
 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
예제 #2
0
 def get_success_url(self):
     return safe_referrer(self.request, 'basket:summary')
예제 #3
0
 def get_success_url(self, request):
     return safe_referrer(request, '.')
예제 #4
0
 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')
예제 #5
0
 def get_error_url(self, request):
     return safe_referrer(request, '.')