예제 #1
0
 def get(self, *args, **kwargs):
     if is_authenticated(self.request.user):
         return redirect(
             default_redirect(self.request,
                              settings.ACCOUNT_LOGIN_REDIRECT_URL))
     if not self.is_open():
         return self.closed()
     return super(SignupView, self).get(*args, **kwargs)
예제 #2
0
 def get_success_url(self, fallback_url=None, **kwargs):
     if fallback_url is None:
         fallback_url = settings.ACCOUNT_SETTINGS_REDIRECT_URL
     kwargs.setdefault("redirect_field_name",
                       self.get_redirect_field_name())
     return default_redirect(self.request, fallback_url, **kwargs)
예제 #3
0
 def get_success_url(self, fallback_url=None, **kwargs):
     if fallback_url is None:
         fallback_url = getattr(settings, self.fallback_url_setting, None)
     kwargs.setdefault("redirect_field_name",
                       self.get_redirect_field_name())
     return default_redirect(self.request, fallback_url, **kwargs)