X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/12e7b7cbf07c8633f3093df7b4898156cca768f6..45fcd6d5e47f5f51e645f12a87776b9b95b2c0b6:/apps/explorer/forms.py?ds=sidebyside diff --git a/apps/explorer/forms.py b/apps/explorer/forms.py index 48b410b5..aa6b48a6 100644 --- a/apps/explorer/forms.py +++ b/apps/explorer/forms.py @@ -7,7 +7,10 @@ from explorer import models class BookForm(forms.Form): content = forms.CharField(widget=forms.Textarea) - message = forms.CharField(required=False) + commit_message = forms.CharField(required=False) + +class BookUploadForm(forms.Form): + file = forms.FileField() class ImageFoldersForm(forms.Form): folders = forms.ChoiceField(required=False) @@ -61,5 +64,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) - repository.add_file(path, unicode(etree.tostring(doc), 'utf-8')) + repository.add_file(path, etree.tostring(doc, pretty_print=True, encoding=unicode))