fixes for django 1.5.x

This commit is contained in:
j 2013-10-11 20:12:37 +02:00
parent 36c7e95788
commit 68b0e525ca
2 changed files with 6 additions and 2 deletions

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
from django.conf.urls.defaults import *
from django.conf.urls import patterns
import views

View file

@ -38,7 +38,11 @@ def x_sendfile(fname,download_name=None):
return response
if getattr(settings,'SENDFILE',False) == 'x_sendfile':
try:
__sendfile = getattr(settings,'SENDFILE',False) == 'x_sendfile'
except:
__sendfile = False
if __sendfile == 'x_sendfile':
sendfile = x_sendfile
else:
sendfile = basic_sendfile