X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/dbf3690fd7b8d30f603f3ef333290c22f4e5d63f..da0c65e6008cc1dbc88b05ed53553d70ec04e3fd:/apps/wiki/views.py diff --git a/apps/wiki/views.py b/apps/wiki/views.py index 7a561064..1cee83ad 100644 --- a/apps/wiki/views.py +++ b/apps/wiki/views.py @@ -110,7 +110,8 @@ def editor(request, slug, chunk=None, template_name='wiki/bootstrap.html'): }, 'tags': list(save_form.fields['stage_completed'].choices), 'can_pubmark': request.user.has_perm('catalogue.can_pubmark'), - 'slug': chunk.book.slug + 'slug': chunk.book.slug, + 'gallery': chunk.book.gallery, }) @@ -233,7 +234,7 @@ def gallery(request, directory): return urllib.quote("%s/%s" % (base_url, smart_unicode(filename))) def is_image(filename): - return os.path.splitext(f)[1].lower() in (u'.jpg', u'.jpeg', u'.png') + return os.path.splitext(filename)[1].lower() in (u'.jpg', u'.jpeg', u'.png') images = [map_to_url(f) for f in map(smart_unicode, os.listdir(base_dir)) if is_image(f)] images.sort()