forked from mirrors/bookwyrm
Add basic view logic for testing
This commit is contained in:
parent
00b8608a50
commit
f524f0cd4d
2 changed files with 8 additions and 1 deletions
|
@ -76,8 +76,12 @@
|
|||
<dd>{{ readthrough.finish_date | naturalday }}</dd>
|
||||
{% elif readthrough.pages_read %}
|
||||
<dt>On page:</dt>
|
||||
<dd>{{ readthrough.pages_read}} of {{ book.pages }}</dd>
|
||||
<dd>{{ readthrough.pages_read }} of {{ book.pages }}</dd>
|
||||
{% endif %}
|
||||
{% for progress_update in readthrough.progress_updates %}
|
||||
<dt>On {{ progress_update.date | naturalday }} you were on:</dt>
|
||||
<dd>{{ progress_update.progress }} of {{ book.pages }}</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
<div class="field is-grouped">
|
||||
<label class="button is-small" for="edit-readthrough-{{ readthrough.id }}" role="button" tabindex="0">
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue