Add basic view logic for testing

This commit is contained in:
Joel Bradshaw
2020-11-16 23:53:46 -08:00
parent 00b8608a50
commit f524f0cd4d
2 changed files with 8 additions and 1 deletions

View File

@@ -562,6 +562,9 @@ def book_page(request, book_id):
book=book,
).order_by('start_date')
for readthrough in readthroughs:
readthrough.progress_updates = readthrough.progressupdate_set.all().order_by('date')
rating = reviews.aggregate(Avg('rating'))
tags = models.Tag.objects.filter(
book=book