From f7357a75a1cc1c25c3dee37820f82aa0117741a6 Mon Sep 17 00:00:00 2001 From: Tobias Zanke Date: Tue, 16 May 2017 16:08:21 +0200 Subject: [PATCH] try import sendfile --- djangodav/views/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/djangodav/views/views.py b/djangodav/views/views.py index 2c9ca9c..e9c37ee 100644 --- a/djangodav/views/views.py +++ b/djangodav/views/views.py @@ -25,7 +25,10 @@ from djangodav import VERSION as djangodav_version from django import VERSION as django_version, get_version -from sendfile import sendfile +try: + import sendfile +except ImportError: + sendfile = None PATTERN_IF_DELIMITER = re.compile(r'(<([^>]+)>)|(\(([^\)]+)\))')