class BookImportForm(forms.Form):
book_xml_file = forms.FileField()
- def save(self, commit=True):
- return Book.from_xml_file(self.cleaned_data['book_xml_file'], overwrite=True)
+ def save(self, commit=True, **kwargs):
+ return Book.from_xml_file(self.cleaned_data['book_xml_file'], overwrite=True, **kwargs)
class SearchForm(forms.Form):
def save(self, user, commit=True):
name = self.cleaned_data['name']
- new_set = Tag(name=name, slug=utils.get_random_hash(name), sort_key=slughifi(name),
+ new_set = Tag(name=name, slug=utils.get_random_hash(name), sort_key=name.lower(),
category='set', user=user)
new_set.save()
('odt', 'ODT'),
('txt', 'TXT'),
('epub', 'EPUB'),
+ ('daisy', 'DAISY'),
)