def oauth2_authorize(request):
    scopes = request.GET.getlist('scopes', django_util.oauth2_settings.scopes)
    return_url = request.GET.get('return_url', None)

    if not return_url:
        return_url = request.META.get('HTTP_REFERER', '/')
    flow = _make_flow(request=request, scopes=scopes, return_url=return_url)
    auth_url = flow.step1_get_authorize_url()
    return shortcuts.redirect(auth_url)
View to start the OAuth2 Authorization flow
dataset/ETHPy150Open google/oauth2client/oauth2client/contrib/django_util/views.py/oauth2_authorize