Returns the success URL to redirect the user to.
979236
def get_success_url(self):
        
        messages.success(self.request, _('Your vote has been cast.'))
        return reverse(
            'forum_conversation:topic',
            kwargs={
                'forum_slug': self.object.topic.forum.slug,
                'forum_pk': self.object.topic.forum.pk,
                'slug': self.object.topic.slug,
                'pk': self.object.topic.pk,
            },
        )
820973
private function RedirectUrl()
    {
        if ($this->logout->GetNextUrl())
        {
            return FrontendRouter::Url($this->logout->GetNextUrl());
        }
        return CurrentUrl();
    }
6267
def _get_nonce(self, url):
        
        action = LOG_JWS_GET_NONCE()
        if len(self._nonces) > 0:
            with action:
                nonce = self._nonces.pop()
                action.add_success_fields(nonce=nonce)
                return succeed(nonce)
        else:
            with action.context():
                return (
                    DeferredContext(self.head(url))
                    .addCallback(self._add_nonce)
                    .addCallback(lambda _: self._nonces.pop())
                    .addCallback(tap(
                        lambda nonce: action.add_success_fields(nonce=nonce)))
                    .addActionFinish())
943127
def safe_redirect(next_url, default=None):
    
    if is_legit_next_url(next_url):
        return redirect(next_url)

    if default:
        return redirect(default)

    return redirect('/')
477454
protected function getLoginUrl(string $redirect_url = '') {
        if (empty($redirect_url)) {
            $redirect_url = $this->getClientUrl();
        }
        return $this->getServerUrl() . self::LOGIN_PATH . '?redirect_url=' . $redirect_url;
    }
1126625
public function getPayURedirectUrl()
    {
        $mode = parent::$apiContext->get('mode');
        $reference = $this->return->payUReference;

        if (!$mode || !$reference)
            return null;

        $url = sprintf(self::REDIRECT_URL, $mode === 'sandbox' ? 'staging' : 'secure', $reference);

        return $url;
    }
718066
protected function _redirectUrl($default = null)
    {
        $request = $this->_request();

        if (!empty($request->getData('_redirect_url'))) {
            return $request->getData('_redirect_url');
        }
        if (!empty($request->getQuery('_redirect_url'))) {
            return $request->getQuery('_redirect_url');
        }
        if (!empty($request->getData('redirect_url'))) {
            return $request->getData('redirect_url');
        }
        if (!empty($request->getQuery('redirect_url'))) {
            return $request->getQuery('redirect_url');
        }

        return $default;
    }
47599
def clean_redirect_uri(self):
        
        redirect_uri = self.cleaned_data.get('redirect_uri')

        if redirect_uri:
            if not redirect_uri == self.client.redirect_uri:
                raise OAuthValidationError({
                    'error': 'invalid_request',
                    'error_description': _("The requested redirect didn't "
                        "match the client settings.")})

        return redirect_uri
1339955
protected function redirectAfterUpdate()
    {
        merchant_toastr(trans('merchant.update_succeeded'));

        $url = Input::get(Builder::PREVIOUS_URL_KEY) ?: $this->resource(-1);

        return redirect($url);
    }
181914
def get_success_url(self):
        """"""
        slugs = '+'.join(self.metric_slugs)
        url = reverse('redis_metric_aggregate_detail', args=[slugs])
        # Django 1.6 quotes reversed URLs, which changes + into %2B. We want
        # want to keep the + in the url (it's ok according to RFC 1738)
        # https://docs.djangoproject.com/en/1.6/releases/1.6/#quoting-in-reverse
        return url.replace("%2B", "+")
660951
def get_success_url(self):
        
        messages.success(self.request, self.success_message)

        if self.object.is_topic_head and self.object.is_topic_tail:
            return reverse(
                'forum:forum',
                kwargs={
                    'slug': self.object.topic.forum.slug, 'pk': self.object.topic.forum.pk,
                },
            )

        return reverse(
            'forum_conversation:topic',
            kwargs={
                'forum_slug': self.object.topic.forum.slug,
                'forum_pk': self.object.topic.forum.pk,
                'slug': self.object.topic.slug,
                'pk': self.object.topic.pk,
            },
        )
676057
def _get_redirect_url(self, request):
        
        if 'next' in request.session:
            next_url = request.session['next']
            del request.session['next']
        elif 'next' in request.GET:
            next_url = request.GET.get('next')
        elif 'next' in request.POST:
            next_url = request.POST.get('next')
        else:
            next_url = request.user.get_absolute_url()
        if not next_url:
            next_url = '/'
        return next_url
205543
def geturl(self):
        
        if self.retries is not None and len(self.retries.history):
            return self.retries.history[-1].redirect_location
        else:
            return self._request_url
1153205
def get_connect_redirect_url(self, request, socialaccount):
        
        assert request.user.is_authenticated
        url = reverse('socialaccount_connections')
        return url
1173975
def redirect(self, url):
        """"""
        url = '{}/view'.format(url)
        return self.request.response.redirect(url)
306089
def get_success_url(self):
        
        if not self.forum_post.approved:
            return reverse(
                'forum:forum',
                kwargs={
                    'slug': self.forum_post.topic.forum.slug,
                    'pk': self.forum_post.topic.forum.pk,
                },
            )
        return reverse(
            'forum_conversation:topic',
            kwargs={
                'forum_slug': self.forum_post.topic.forum.slug,
                'forum_pk': self.forum_post.topic.forum.pk,
                'slug': self.forum_post.topic.slug,
                'pk': self.forum_post.topic.pk,
            },
        )
484665
public static function to()
    {
        // Is what we're providing a URL object?
        $args = func_get_args();
        if (is_object($args[0]) && $args[0] instanceof UrlInterface) {
            $url = $args[0];
        } else {
            $url = call_user_func_array('\URL::to', func_get_args());
        }
        $r = static::createRedirectResponse((string) $url, 302, array());

        return $r;
    }