Edit books

Fixes #109
This commit is contained in:
Mouse Reeve
2020-03-28 15:06:16 -07:00
parent 16fec1b6d5
commit 1a33290267
11 changed files with 281 additions and 44 deletions

View File

@ -390,10 +390,22 @@ def book_page(request, book_identifier, tab='friends'):
],
'active_tab': tab,
'path': '/book/%s' % book_identifier,
'cover_form': forms.CoverForm(instance=book),
}
return TemplateResponse(request, 'book.html', data)
@login_required
def edit_book_page(request, book_identifier):
''' info about a book '''
book = books_manager.get_or_create_book(book_identifier)
data = {
'book': book,
'form': forms.BookForm(instance=book)
}
return TemplateResponse(request, 'edit_book.html', data)
def author_page(request, author_identifier):
''' landing page for an author '''
try: