Remove fedireads_key field

we have ID
This commit is contained in:
Mouse Reeve
2020-05-03 17:53:14 -07:00
parent fba1397444
commit 2fd7792f34
21 changed files with 65 additions and 70 deletions

View File

@ -1 +1 @@
<a href="/author/{{ book.authors.first.fedireads_key }}" class="author">{{ book.authors.first.name }}</a>
<a href="/author/{{ book.authors.first.id }}" class="author">{{ book.authors.first.name }}</a>

View File

@ -1,5 +1,5 @@
<span class="title">
<a href="/book/{{ book.fedireads_key }}">{{ book.title }}</a>
<a href="/book/{{ book.id }}">{{ book.title }}</a>
</span>
{% if book.authors %}
<span class="author">

View File

@ -37,7 +37,7 @@
<h2>
{% include 'snippets/avatar.html' with user=user %}
Your thoughts on
a <a href="/book/{{ book.fedireads_key }}">{{ book.title }}</a>
a <a href="/book/{{ book.id }}">{{ book.title }}</a>
by {% include 'snippets/authors.html' with book=book %}
</h2>

View File

@ -21,7 +21,7 @@
{% endif %}
<form class="tab-option-{{ book.id }} review-form" name="review" action="/review/" method="post" id="tab-review-{{ book.id }}">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}">
<input type="hidden" name="book" value="{{ book.id }}">
{% include 'snippets/rate_form.html' with book=book %}
{{ review_form.as_p }}
<button type="submit">post review</button>
@ -29,14 +29,14 @@
<form class="hidden tab-option-{{ book.id }} review-form" name="comment" action="/comment/" method="post" id="tab-comment-{{ book.id }}">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}">
<input type="hidden" name="book" value="{{ book.id }}">
{{ comment_form.as_p }}
<button type="submit">post comment</button>
</form>
<form class="hidden tab-option-{{ book.id }} review-form quote-form" name="quotation" action="/quotate/" method="post" id="tab-quotation-{{ book.id }}">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}">
<input type="hidden" name="book" value="{{ book.id }}">
{{ quotation_form.as_p }}
<button typr="submit">post quote</button>
</form>

View File

@ -4,7 +4,7 @@
{% for i in '12345'|make_list %}
<form name="rate" action="/rate/" method="POST" onsubmit="return rate_stars(event)">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}">
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="rating" value="{{ forloop.counter }}">
<button type="submit" class="icon icon-star-{% if book|rating:user < forloop.counter %}empty{% else %}full{% endif %}">
<span class="hidden-text">{{ forloop.counter }} star{{ forloop.counter | pluralize }}</span>

View File

@ -39,7 +39,7 @@
{% include 'snippets/book_cover.html' with book=book size="small" %}
</td>
<td>
<a href="/book/{{ book.fedireads_key }}">{{ book.title }}</a>
<a href="/book/{{ book.id }}">{{ book.title }}</a>
</td>
<td>
{{ book.authors.first.name }}

View File

@ -3,14 +3,14 @@
{% if tag.identifier in user_tags %}
<form class="tag-form" name="tag" action="/untag/" method="post">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}">
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="name" value="{{ tag.name }}">
<button type="submit">x</button>
</form>
{% else %}
<form class="tag-form" name="tag" action="/tag/" method="post">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.fedireads_key }}">
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="name" value="{{ tag.name }}">
<button type="submit">+</button>
</form>