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
|
@ -78,6 +78,10 @@
|
||||||
<dt>On page:</dt>
|
<dt>On page:</dt>
|
||||||
<dd>{{ readthrough.pages_read }} of {{ book.pages }}</dd>
|
<dd>{{ readthrough.pages_read }} of {{ book.pages }}</dd>
|
||||||
{% endif %}
|
{% 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>
|
</dl>
|
||||||
<div class="field is-grouped">
|
<div class="field is-grouped">
|
||||||
<label class="button is-small" for="edit-readthrough-{{ readthrough.id }}" role="button" tabindex="0">
|
<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,
|
book=book,
|
||||||
).order_by('start_date')
|
).order_by('start_date')
|
||||||
|
|
||||||
|
for readthrough in readthroughs:
|
||||||
|
readthrough.progress_updates = readthrough.progressupdate_set.all().order_by('date')
|
||||||
|
|
||||||
rating = reviews.aggregate(Avg('rating'))
|
rating = reviews.aggregate(Avg('rating'))
|
||||||
tags = models.Tag.objects.filter(
|
tags = models.Tag.objects.filter(
|
||||||
book=book
|
book=book
|
||||||
|
|
Loading…
Reference in a new issue