Reviews
This commit is contained in:
parent
0345a5d9ff
commit
7ee59c5fd5
10 changed files with 407 additions and 256 deletions
27
fedireads/templates/book.html
Normal file
27
fedireads/templates/book.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
<div id="main">
|
||||
<div class="book-profile">
|
||||
<img class="book-cover" src="/static/images/med.jpg">
|
||||
<h1>{{ book.data.title }}</h1>
|
||||
by {{ book.authors.first.data.name }}
|
||||
{{ rating }} stars
|
||||
</div>
|
||||
<form name="review" action="/review/" method="post">
|
||||
<input type="hidden" name="book" value="{{ book.openlibrary_key }}"></input>
|
||||
<input type="text" name="name"></input>
|
||||
<textarea name="content">Your review</textarea>
|
||||
<input type="number" name="rating"></input>
|
||||
<input type="submit" value="Post review"></input>
|
||||
</form>
|
||||
|
||||
<div class="reviews">
|
||||
<h2>Reviews</h2>
|
||||
{% for review in reviews %}
|
||||
<p><span class="review-title">{{ review.name }}</span>{{ review.rating }} stars, by {{ review.user.username }}</p>
|
||||
<p>{{ review.review_content }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue