Commit df98d5cb by Scott Duckworth

fix DeprecationWarning for mimetype

parent 5691a6db
...@@ -47,7 +47,7 @@ def lookup(request): ...@@ -47,7 +47,7 @@ def lookup(request):
payload = request.read() payload = request.read()
key = UserKey.objects.get(id=int(payload)) key = UserKey.objects.get(id=int(payload))
key.touch() key.touch()
return HttpResponse(str(key.last_used), mimetype='text/plain') return HttpResponse(str(key.last_used), content_type='text/plain')
try: try:
fingerprint = request.GET['fingerprint'] fingerprint = request.GET['fingerprint']
keys = UserKey.objects.filter(fingerprint=fingerprint) keys = UserKey.objects.filter(fingerprint=fingerprint)
...@@ -67,7 +67,7 @@ def lookup(request): ...@@ -67,7 +67,7 @@ def lookup(request):
else: else:
options = '' options = ''
response += options + key.key + '\n' response += options + key.key + '\n'
return HttpResponse(response, mimetype='text/plain') return HttpResponse(response, content_type='text/plain')
@login_required @login_required
@require_GET @require_GET
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment