},
'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,
})
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()