From abcae9e6c48ba6709a04a3c1482cb6cc944a080a Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 7 Jan 2022 09:47:58 -0800 Subject: [PATCH] Removes caches that cause CSRF token failures --- bookwyrm/templates/feed/suggested_books.html | 4 ---- bookwyrm/templates/snippets/follow_button.html | 4 ---- bookwyrm/templates/snippets/shelve_button/shelve_button.html | 4 ---- 3 files changed, 12 deletions(-) diff --git a/bookwyrm/templates/feed/suggested_books.html b/bookwyrm/templates/feed/suggested_books.html index b2f1b5d28..899767d13 100644 --- a/bookwyrm/templates/feed/suggested_books.html +++ b/bookwyrm/templates/feed/suggested_books.html @@ -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 %}

{% trans "Your Books" %}

@@ -80,4 +77,3 @@ {% endwith %} {% endif %}
-{% endcache %} diff --git a/bookwyrm/templates/snippets/follow_button.html b/bookwyrm/templates/snippets/follow_button.html index a5c40b24b..f7025bbaa 100644 --- a/bookwyrm/templates/snippets/follow_button.html +++ b/bookwyrm/templates/snippets/follow_button.html @@ -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 %} {% endif %} -{% endcache %} diff --git a/bookwyrm/templates/snippets/shelve_button/shelve_button.html b/bookwyrm/templates/snippets/shelve_button/shelve_button.html index 0ffc708d3..38f6be38c 100644 --- a/bookwyrm/templates/snippets/shelve_button/shelve_button.html +++ b/bookwyrm/templates/snippets/shelve_button/shelve_button.html @@ -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 %}