from django.core.management.base import BaseCommand
from django.core.management.color import color_style
+from django.utils.encoding import smart_unicode
from catalogue.management.prompt import confirm
from catalogue.models import Book
from optparse import make_option
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)
holder['xml'] += u"%s\n" % t
def dc(k, v):
+ v = smart_unicode(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):