

def get_next(self, request):
    '\n        Returns a url to redirect to after the login / signup.\n        '
    if ('next' in request.session):
        next = request.session['next']
        del request.session['next']
    elif ('next' in request.GET):
        next = request.GET.get('next')
    elif ('next' in request.POST):
        next = request.POST.get('next')
    else:
        next = getattr(settings, 'LOGIN_REDIRECT_URL', '/')
    netloc = urlparse.urlparse(next)[1]
    if (netloc and (netloc != request.get_host())):
        next = getattr(settings, 'LOGIN_REDIRECT_URL', '/')
    return next

dataset/ETHPy150Open flashingpumpkin/django-socialregistration/socialregistration/mixins.py CommonMixin.get_next/original