def get_next(self):
        next = self.request.GET.get('next', None)
        if not next:
            return '/'
        netloc = urlparse.urlparse(next)[1]
        # Heavier security check -- don't allow redirection to a different
        # host.
        # Taken from django.contrib.auth.views.login
        if netloc and netloc != self.request.get_host():
            return '/'
        return next
Given a request, returns the URL where a user should be redirected to
dataset/ETHPy150Open aldryn/django-simple-sso/simple_sso/sso_client/client.py/LoginView.get_next