From 68b0e525ca5378170fe3432723a126582091670d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 11 Oct 2013 20:12:37 +0200 Subject: [PATCH] fixes for django 1.5.x --- ox/django/api/urls.py | 2 +- ox/django/utils.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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