@register.simple_tag
-def person_name(person):
- return ' '.join(p.strip() for p in person.split(',')[::-1])
+def all_editors(extra_info):
+ return ', '.join(
+ ' '.join(p.strip() for p in person.rsplit(',', 1)[::-1])
+ for person in sorted(set(extra_info['editors'] + extra_info['technical_editors'])))
@register.simple_tag
"""
def setUp(self):
self._MEDIA_ROOT, settings.MEDIA_ROOT = settings.MEDIA_ROOT, tempfile.mkdtemp(prefix='djangotest_')
+ settings.NO_BUILD_EPUB = settings.NO_BUILD_TXT = True
def tearDown(self):
shutil.rmtree(settings.MEDIA_ROOT, True)
-Subproject commit a2f8ee881d66601e9cb714069dc88d3ed9703db6
+Subproject commit 0fd2ed230ea6d53adb5e627731672c996485167b
<p>{{ book.get_extra_info_value.description }}</p>
{% endif %}
- {% if book.get_extra_info_value.technical_editors or book.get_extra_info_value.editors %}
+ {% if book.get_extra_info_value.editors or book.get_extra_info_value.technical_editors %}
<p>{% trans "Edited and annotated by:" %}
- {% for name in book.get_extra_info_value.technical_editors|add:book.get_extra_info_value.editors %}{% if not forloop.first %}, {% endif %}
- {% person_name name %}{% endfor %}.</p>
+ {% all_editors book.get_extra_info_value %}.</p>
{% endif %}