fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3ecd722
)
#1060: sorted and unique editors' names
author
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Mon, 24 Jan 2011 11:52:47 +0000
(12:52 +0100)
committer
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Mon, 24 Jan 2011 11:52:47 +0000
(12:52 +0100)
some tests fixes
apps/catalogue/templatetags/catalogue_tags.py
patch
|
blob
|
history
apps/catalogue/test_utils.py
patch
|
blob
|
history
lib/librarian
patch
|
blob
|
history
wolnelektury/templates/catalogue/book_text.html
patch
|
blob
|
history
diff --git
a/apps/catalogue/templatetags/catalogue_tags.py
b/apps/catalogue/templatetags/catalogue_tags.py
index
29b4f2b
..
3a60a06
100644
(file)
--- a/
apps/catalogue/templatetags/catalogue_tags.py
+++ b/
apps/catalogue/templatetags/catalogue_tags.py
@@
-140,8
+140,10
@@
def book_tree(book_list, books_by_parent):
@register.simple_tag
@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
@register.simple_tag
diff --git
a/apps/catalogue/test_utils.py
b/apps/catalogue/test_utils.py
index
398a0fe
..
1dcd726
100644
(file)
--- a/
apps/catalogue/test_utils.py
+++ b/
apps/catalogue/test_utils.py
@@
-10,6
+10,7
@@
class WLTestCase(TestCase):
"""
def setUp(self):
self._MEDIA_ROOT, settings.MEDIA_ROOT = settings.MEDIA_ROOT, tempfile.mkdtemp(prefix='djangotest_')
"""
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)
def tearDown(self):
shutil.rmtree(settings.MEDIA_ROOT, True)
diff --git
a/lib/librarian
b/lib/librarian
index
a2f8ee8
..
0fd2ed2
160000
(submodule)
--- a/
lib/librarian
+++ b/
lib/librarian
@@
-1
+1
@@
-Subproject commit
a2f8ee881d66601e9cb714069dc88d3ed9703db6
+Subproject commit
0fd2ed230ea6d53adb5e627731672c996485167b
diff --git
a/wolnelektury/templates/catalogue/book_text.html
b/wolnelektury/templates/catalogue/book_text.html
index
3bf3359
..
34232ec
100644
(file)
--- a/
wolnelektury/templates/catalogue/book_text.html
+++ b/
wolnelektury/templates/catalogue/book_text.html
@@
-44,10
+44,9
@@
<p>{{ book.get_extra_info_value.description }}</p>
{% endif %}
<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:" %}
<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 %}
{% endif %}