Publishing tags, and fixes.
[wolnelektury.git] / src / catalogue / templatetags / catalogue_tags.py
index 6ee1777..b45fc50 100644 (file)
@@ -106,7 +106,7 @@ def nice_title_from_tags(tags, related_tags):
             # No info on genre, but there's only one kind related.
             subpieces = []
             pieces.append([
-                t.collective_noun or t.name for t in self['kind']
+                t.collective_noun or t.name for t in related_tags['kind']
             ])
             plural = False
         else:
@@ -131,9 +131,9 @@ def nice_title_from_tags(tags, related_tags):
     p = []
     for sublist in pieces:
         for item in sublist[:-2]:
-            p.append(item) + ','
+            p.append(item + ',')
         for item in sublist[-2:-1]:
-            p.append(item) + ' i'
+            p.append(item + ' i')
         p.append(sublist[-1])
 
     return ' '.join(p)