handle utf in make_master
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 6 Feb 2013 13:29:33 +0000 (14:29 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 6 Feb 2013 13:29:33 +0000 (14:29 +0100)
apps/catalogue/management/commands/make_master.py
lib/librarian

index 4bca383..08ccb7f 100644 (file)
@@ -2,6 +2,7 @@
 
 from django.core.management.base import BaseCommand
 from django.core.management.color import color_style
+from django.utils.encoding import smart_text
 from catalogue.management.prompt import confirm
 from catalogue.models import Book
 from optparse import make_option
@@ -81,6 +82,7 @@ class Command(BaseCommand):
             holder['xml'] += u"%s\n" % t
 
         def dc(k, v):
+            v = smart_text(v)
             p(u'<dc:%s xml:lang="pl" xmlns:dc="http://purl.org/dc/elements/1.1/">%s</dc:%s>' % (k, v, k))
 
         def t(tag, ct):
index 11d8630..1ffcf32 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 11d863057b43462248572daed7c8fc698d573b3d
+Subproject commit 1ffcf32a8d795681f54bd125ca45e908da5ed3fb