From cf46c44c4d4c22e9883bb586c7ba2c2e290b2230 Mon Sep 17 00:00:00 2001 From: pmdarrow Date: Fri, 19 Aug 2011 16:23:32 -0300 Subject: [PATCH] Check USE_UPLOADIFY before trying to import from uploadify. --- filebrowser/uploadify_views.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/filebrowser/uploadify_views.py b/filebrowser/uploadify_views.py index 66c7287..4e562d3 100644 --- a/filebrowser/uploadify_views.py +++ b/filebrowser/uploadify_views.py @@ -71,9 +71,10 @@ def upload(request): upload = staff_member_required(never_cache(upload)) # Uploadify handler -from uploadify.views import upload_received -def uploadify_received_handler(sender, request, data, **kwargs): - if (sender=='filebrowser'): - return file_process(request) -upload_received.connect(uploadify_received_handler) +if USE_UPLOADIFY: + from uploadify.views import upload_received + def uploadify_received_handler(sender, request, data, **kwargs): + if (sender=='filebrowser'): + return file_process(request) + upload_received.connect(uploadify_received_handler)