Make BookEditView and AddBookWizard share the template and the forms (by making BookMetadataForm a subclass of BookEditForm), plus cleanup the templates, forms, and related stuff in the process. This should make the code more maintainable and allow for further changes in the edit/import functionality easier to keep in sync, as discussed at #39.
The changes on books/epub.py (and in turn commands/addepub.py) revert some previous changes that were not handled properly: when modifying models or epub.py, it's important to make sure it does not break things elsewhere - as we do not have proper tests for the UI yet, please do be careful and check manually when introducing such changes!
Things that would need work in further iterations:
tags are currently not imported when uploading a book. This is mainly related to the books/epub.py comment - we probably want to move the "cleaning up" of the authors/publishers/tags/etc (strip, check for empty, cleanup) there, in order to avoid having to clean them up both on addepub and on the wizard.
prettifying the templates.
run makemessages and adjust where necessary (and double check for untranslated strings)
Merged - as usual, please review whenever you have the chance and follow up if needed (in particular due to the lack of makemessages and possible dancing around of the translation strings).
Make
BookEditView
andAddBookWizard
share the template and the forms (by makingBookMetadataForm
a subclass ofBookEditForm
), plus cleanup the templates, forms, and related stuff in the process. This should make the code more maintainable and allow for further changes in the edit/import functionality easier to keep in sync, as discussed at #39.The changes on
books/epub.py
(and in turncommands/addepub.py
) revert some previous changes that were not handled properly: when modifying models orepub.py
, it's important to make sure it does not break things elsewhere - as we do not have proper tests for the UI yet, please do be careful and check manually when introducing such changes!Things that would need work in further iterations:
books/epub.py
comment - we probably want to move the "cleaning up" of the authors/publishers/tags/etc (strip, check for empty, cleanup) there, in order to avoid having to clean them up both on addepub and on the wizard.makemessages
and adjust where necessary (and double check for untranslated strings)