Adds edit author form and stores last edited by

This commit is contained in:
Mouse Reeve
2020-12-22 09:26:40 -08:00
parent 830aaf9d1c
commit 25dee8362d
8 changed files with 182 additions and 25 deletions

View File

@ -657,6 +657,20 @@ def edit_book_page(request, book_id):
return TemplateResponse(request, 'edit_book.html', data)
@login_required
@permission_required('bookwyrm.edit_book', raise_exception=True)
@require_GET
def edit_author_page(request, author_id):
''' info about a book '''
author = get_object_or_404(models.Author, id=author_id)
data = {
'title': 'Edit Author',
'author': author,
'form': forms.AuthorForm(instance=author)
}
return TemplateResponse(request, 'edit_author.html', data)
@require_GET
def editions_page(request, book_id):
''' list of editions of a book '''