fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add collection for Boy
[wolnelektury.git]
/
apps
/
catalogue
/
forms.py
diff --git
a/apps/catalogue/forms.py
b/apps/catalogue/forms.py
index
2bf974d
..
391e3e4
100644
(file)
--- a/
apps/catalogue/forms.py
+++ b/
apps/catalogue/forms.py
@@
-3,7
+3,6
@@
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django import forms
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django import forms
-from django.core.files.base import ContentFile
from django.utils.translation import ugettext_lazy as _
from slughifi import slughifi
from django.utils.translation import ugettext_lazy as _
from slughifi import slughifi
@@
-17,6
+16,8
@@
class BookImportForm(forms.Form):
book_xml = forms.CharField(required=False)
def clean(self):
book_xml = forms.CharField(required=False)
def clean(self):
+ from django.core.files.base import ContentFile
+
if not self.cleaned_data['book_xml_file']:
if self.cleaned_data['book_xml']:
self.cleaned_data['book_xml_file'] = \
if not self.cleaned_data['book_xml_file']:
if self.cleaned_data['book_xml']:
self.cleaned_data['book_xml_file'] = \
@@
-85,6
+86,7
@@
FORMATS = (
('txt', 'TXT'),
('epub', 'EPUB'),
('daisy', 'DAISY'),
('txt', 'TXT'),
('epub', 'EPUB'),
('daisy', 'DAISY'),
+ ('mobi', 'MOBI'),
)
)