return HttpResponseRedirect(str(settings.APP_FAVICON))
def custom_css(request):
- return HttpResponse(or_preview(settings.CUSTOM_CSS, request), mimetype="text/css")
+ return HttpResponse(or_preview(settings.CUSTOM_CSS, request), content_type="text/css")
def static(request, title, content):
return render_to_response('static.html', {'content' : content, 'title': title},
def media(request, skin, path):
response = serve(request, "%s/media/%s" % (skin, path),
document_root=os.path.join(os.path.dirname(os.path.dirname(__file__)), 'skins').replace('\\', '/'))
- content_type = response['Content-Type']
+ content_type = response.get('Content-Type', '')
if ('charset=' not in content_type):
if (content_type.startswith('text') or content_type=='application/x-javascript'):
content_type += '; charset=utf-8'
sidebar = mark_safe(sidebar)
else:
- return HttpResponse(page.body, mimetype=page.extra.get('mimetype', 'text/html'))
+ return HttpResponse(page.body, content_type=page.extra.get('mimetype', 'text/html'))
render = page.extra.get('render', 'markdown')