X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/63b561ced6cafa40d50fa15d7098548970db3f85..d539eec66c70f217231de6d1920e16344b8d93df:/apps/catalogue/management/commands/make_master.py diff --git a/apps/catalogue/management/commands/make_master.py b/apps/catalogue/management/commands/make_master.py index 821def6e..08ccb7fa 100644 --- a/apps/catalogue/management/commands/make_master.py +++ b/apps/catalogue/management/commands/make_master.py @@ -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 @@ -59,11 +60,11 @@ class Command(BaseCommand): print "type is '%s', setting to '%s'" % (typ.text, typ_) changed = True typ.text = typ_ - audience = t.xpath("//dc:audience", namespaces=dc_namespaces)[0] - if audience.text != audience_: - print "audience is '%s', setting to '%s'" % (audience.text, audience_) - changed = True - audience.text = audience_ + #audience = t.xpath("//dc:audience", namespaces=dc_namespaces)[0] + #if audience.text != audience_: + # print "audience is '%s', setting to '%s'" % (audience.text, audience_) + # changed = True + # audience.text = audience_ if changed: print "will commit." fc.commit(etree.tostring(t, encoding=unicode), **commit_args) @@ -81,6 +82,7 @@ class Command(BaseCommand): holder['xml'] += u"%s\n" % t def dc(k, v): + v = smart_text(v) p(u'%s' % (k, v, k)) def t(tag, ct):