Merge pull request #1783 from bookwyrm-social/bad-caches

Removes caches that cause CSRF token failures
This commit is contained in:
Mouse Reeve 2022-01-07 10:14:17 -08:00 committed by GitHub
commit 2ff9ba8bee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 12 deletions

View file

@ -1,9 +1,6 @@
{% load i18n %}
{% load cache %}
{% load bookwyrm_tags %}
{# 6 month cache #}
{% cache 15552000 suggested_books request.user.id %}
{% suggested_books as suggested_books %}
<section class="block">
<h2 class="title is-4">{% trans "Your Books" %}</h2>
@ -80,4 +77,3 @@
{% endwith %}
{% endif %}
</section>
{% endcache %}

View file

@ -1,8 +1,5 @@
{% load i18n %}
{% load cache %}
{# 6 month cache #}
{% cache 15552000 follow_button request.user.id user.id %}
{% if request.user == user or not request.user.is_authenticated %}
{% elif user in request.user.blocks.all %}
{% include 'snippets/block_button.html' with blocks=True %}
@ -46,4 +43,3 @@
{% endif %}
</div>
{% endif %}
{% endcache %}

View file

@ -1,10 +1,7 @@
{% load bookwyrm_tags %}
{% load utilities %}
{% load cache %}
{% if request.user.is_authenticated %}
{# 6 month cache #}
{% cache 15552000 shelve_button request.user.id book.id %}
{% with book.id|uuid as uuid %}
{% active_shelf book as active_shelf %}
@ -35,5 +32,4 @@
{% include 'snippets/reading_modals/progress_update_modal.html' with book=active_shelf.book id=modal_id readthrough=readthrough class="" %}
{% endwith %}
{% endcache %}
{% endif %}