fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d08b6d8
)
Zapisywanie XML do unicode w DublinCoreForm.
author
zuber
<marek@stepniowski.com>
Mon, 31 Aug 2009 13:38:16 +0000
(15:38 +0200)
committer
zuber
<marek@stepniowski.com>
Mon, 31 Aug 2009 13:38:16 +0000
(15:38 +0200)
apps/explorer/forms.py
patch
|
blob
|
history
diff --git
a/apps/explorer/forms.py
b/apps/explorer/forms.py
index
c2f7c3a
..
1111b26
100644
(file)
--- a/
apps/explorer/forms.py
+++ b/
apps/explorer/forms.py
@@
-61,5
+61,5
@@
class DublinCoreForm(forms.Form):
old_rdf = doc.getroottree().find('//{http://www.w3.org/1999/02/22-rdf-syntax-ns#}RDF')
old_rdf.getparent().remove(old_rdf)
doc.insert(0, rdf)
old_rdf = doc.getroottree().find('//{http://www.w3.org/1999/02/22-rdf-syntax-ns#}RDF')
old_rdf.getparent().remove(old_rdf)
doc.insert(0, rdf)
- repository.add_file(path,
unicode(etree.tostring(doc), 'utf-8'
))
+ repository.add_file(path,
etree.tostring(doc, pretty_print=True, encoding=unicode
))