def login(request):
    ' Log user in using GitHub OAuth\n\n    arguments:\n        :request: GET HTTP request\n\n    returns:\n        Redirects to index\n    '
    if (not request.session.get('github_token')):
        request.session['github_token'] = None
        request.session['github_info'] = None
    if (os.environ.get('SELENIUM_TEST') == '1'):
        assert os.environ.get('GH_TOKEN'), 'GH_TOKEN not set'
        request.session['github_token'] = os.environ.get('GH_TOKEN')
        request.session['github_info'] = github_util.get_user_info(request.session['github_token'])
        return HttpResponseRedirect(reverse('index'))
    return HttpResponseRedirect(GITHUB_OATH_AUTH_PATH)
Log user in using GitHub OAuth

arguments:
    :request: GET HTTP request

returns:
    Redirects to index
def login(request):
    ' Log user in using GitHub OAuth\n\n    arguments:\n        :request: GET HTTP request\n\n    returns:\n        Redirects to index\n    '
    if (not request.session.get('github_token')):
        request.session['github_token'] = None
        request.session['github_info'] = None
    if (os.environ.get('SELENIUM_TEST') == '1'):
        assert os.environ.get('GH_TOKEN'), 'GH_TOKEN not set'
        request.session['github_token'] = os.environ.get('GH_TOKEN')
        request.session['github_info'] = github_util.get_user_info(request.session['github_token'])
        return HttpResponseRedirect(reverse('index'))
    return HttpResponseRedirect(GITHUB_OATH_AUTH_PATH)