PEP8 of most of the API app

This commit is contained in:
2010-10-26 09:02:05 +01:00
parent 8823217066
commit dee89dff68
6 changed files with 48 additions and 45 deletions

View File

@@ -2,12 +2,13 @@ from django.http import HttpResponseForbidden
from django.contrib.auth.models import AnonymousUser
from api.models import AuthAPIKey
class APIKeyAuthentication(object):
def is_authenticated(self, request):
params = {}
for key,value in request.GET.items():
for key, value in request.GET.items():
params[key.lower()] = value
if 'apikey' in params:
@@ -24,4 +25,3 @@ class APIKeyAuthentication(object):
def challenge(self):
return HttpResponseForbidden('Access Denied, use a API Key')