From 49afe89936d246918e817148a7c155950a1e461a Mon Sep 17 00:00:00 2001 From: zuber Date: Fri, 8 Jan 2010 00:57:51 +0100 Subject: [PATCH 1/1] =?utf8?q?Wy=C5=9Bwietlanie=20r=C3=B3wnie=C5=BC=20plik?= =?utf8?q?=C3=B3w=20JPG=20w=20galerii=20skan=C3=B3w.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- apps/explorer/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/explorer/views.py b/apps/explorer/views.py index aeb295d9..c1ada7a5 100755 --- a/apps/explorer/views.py +++ b/apps/explorer/views.py @@ -138,7 +138,7 @@ def document_gallery(request, directory): try: base_dir = os.path.join(settings.MEDIA_ROOT, settings.FILEBROWSER_DIRECTORY, directory) print base_dir - images = ['%s%s%s/%s' % (settings.MEDIA_URL, settings.FILEBROWSER_DIRECTORY, directory, f) for f in os.listdir(base_dir) if f.lower().endswith('.png')] + images = ['%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 ('.jpg', '.jpeg', '.png')] return HttpResponse(json.dumps(images)) except (IndexError, OSError), e: raise Http404 -- 2.20.1