

def twitter_login(request, redirect_field_name='next'):
    try:
        protocol = ('https' if request.is_secure() else 'http')
        host = request.get_host()
        path = reverse('twitter-callback')
        callback_url = (((protocol + '://') + host) + path)
    except NoReverseMatch:
        callback_url = None
    consumer = oauth.Consumer(settings.KEY, settings.SECRET)
    request_token = oauth.RequestToken(consumer, callback_url=callback_url)
    request.session['redirect_to'] = host.REQUEST.get(redirect_field_name, None)
    return HttpResponseRedirect(request_token.authorization_url)

dataset/ETHPy150Open mdiep/django-twitter-users/twitter_users/views.py twitter_login/VarMisuse@109/151 `request`->`host`