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'
from django.template import RequestContext
from django import template
from django.utils.html import *
+from django.utils.http import urlquote
from django.db.models import Q, Count
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse