diff --git a/ox/django/api/urls.py b/ox/django/api/urls.py index 33b8552..460da84 100644 --- a/ox/django/api/urls.py +++ b/ox/django/api/urls.py @@ -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 diff --git a/ox/django/utils.py b/ox/django/utils.py index 35af419..e01fd25 100644 --- a/ox/django/utils.py +++ b/ox/django/utils.py @@ -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