Revision 4732ed31 pithos/api/login.py

b/pithos/api/login.py
45 45
    users = settings.AUTHENTICATION_USERS
46 46
    host = settings.AUTHENTICATION_HOST
47 47
    if users is not None or host is None:
48
    	return HttpResponseNotFound()
48
        return HttpResponseNotFound()
49 49
    
50 50
    if request.is_secure():
51
    	proto = 'https://'
51
        proto = 'https://'
52 52
    else:
53
    	proto = 'http://'
54
	next = request.GET.get('next', '')
55
	params = {'next': next}
56
	renew = 'renew' in request.GET
57
	if renew:
58
		params['renew'] = True
53
        proto = 'http://'
54
    next = request.GET.get('next', '')
55
    params = {'next': next}
56
    renew = 'renew' in request.GET
57
    if renew:
58
        params['renew'] = True
59 59
    uri = proto + host + '/login?' + urlencode(params)
60
    return HttpResponseRedirect(uri)
60
    return HttpResponseRedirect(uri)

Also available in: Unified diff