2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 23:07:09 +00:00

Django 1.7 mostly working. Big refactor so probably bugs

This commit is contained in:
Sam Wenham
2018-04-15 16:28:13 +01:00
parent 2c2c815b25
commit 758259be4d
18 changed files with 82 additions and 60 deletions

View File

@@ -75,7 +75,7 @@ def flatpage(request, path):
body.strip
return render_with_context(request, 'flatpage.html', {'editable': True, 'path': path, 'title': title, 'body': body, 'homepage': (path == "index.htm")})
else:
return HttpResponse(o.read(), mimetype=getmimetype(path))
return HttpResponse(o.read(), content_type=getmimetype(path))
def getmimetype(path):
if path.lower().endswith(".png"): return "image/png"