+
+def folder_images(request, folder):
+ return direct_to_template(request, 'explorer/folder_images.html', extra_context={
+ 'images': models.get_images_from_folder(folder),
+ })
+
+def _add_references(message, issues):
+ for issue in issues:
+ message += " refs #%d " % issue.id
+ return message
+
+def _get_issues_for_file(path):
+ if not path.endswith('.xml'):
+ raise ValueError('Path must end with .xml')
+
+ book_id = path[:-3]
+ uf = urllib2.urlopen(settings.REDMINE_URL + 'publications/%s/issues' % book_id)
+
+ try:
+ return json.loads(uf.read())
+ finally:
+ uf.close()