Port to new django version - not yet fully working

- location field makes problems
This commit is contained in:
Martin Bauer
2019-01-05 11:27:15 +01:00
parent 72a9642a8e
commit 663185fd40
168 changed files with 797 additions and 5967 deletions

View File

@@ -66,7 +66,7 @@ def score( request, pk ):
if request.method == 'GET':
imageFile = requestedScore.get_image_file()
image_data = open( settings.MEDIA_ROOT + imageFile, "rb").read()
return HttpResponse(image_data, mimetype="image/jpeg")
return HttpResponse(image_data, content_type="image/jpeg")
if request.method == "DELETE":
if requestedScore.uploaded_by != request.user or request.user.has_perm('scoremanager.manage_scores'):
raise PermissionDenied