From: Łukasz Rekucki Date: Fri, 5 Mar 2010 14:57:33 +0000 (+0100) Subject: Dirty hack to fix gallery editing on some browsers X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/864b3abeea4d58718f4e04de96278e184af7857b?hp=196df56422f4c2e5b77cc7e6596b6d4326d9ba41 Dirty hack to fix gallery editing on some browsers --- diff --git a/apps/filebrowser/views.py b/apps/filebrowser/views.py index 32f79c22..30869a4d 100644 --- a/apps/filebrowser/views.py +++ b/apps/filebrowser/views.py @@ -63,9 +63,9 @@ def browse(request): dir_list = os.listdir(abs_path) files = [] - print "LISTING FILES: ", dir_list + # print "LISTING FILES: ", dir_list for file in dir_list: - print repr(file) + # print repr(file) # EXCLUDE FILES MATCHING VERSIONS_PREFIX OR ANY OF THE EXCLUDE PATTERNS filtered = file.startswith('.') for re_prefix in filter_re: diff --git a/apps/wiki/views.py b/apps/wiki/views.py index 4f808f0d..685e87e2 100644 --- a/apps/wiki/views.py +++ b/apps/wiki/views.py @@ -43,5 +43,8 @@ def document_gallery(request, directory): images = [u'%s%s%s/%s' % (settings.MEDIA_URL, settings.FILEBROWSER_DIRECTORY, directory, f) for f in os.listdir(base_dir) if os.path.splitext(f)[1].lower() in (u'.jpg', u'.jpeg', u'.png')] images.sort() return HttpResponse(json.dumps(images)) - except (IndexError, OSError), e: + except (IndexError, OSError), exc: + import traceback + traceback.print_exc() + raise Http404 diff --git a/platforma/templates/wiki/document_details.html b/platforma/templates/wiki/document_details.html index 43e5dfd3..1362a806 100644 --- a/platforma/templates/wiki/document_details.html +++ b/platforma/templates/wiki/document_details.html @@ -59,12 +59,12 @@