Merge pull request #1778 from hughrun/register-403

do not cache registration form
This commit is contained in:
Mouse Reeve 2022-01-06 18:56:23 -08:00 committed by GitHub
commit 0ddecd7049
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -1,11 +1,13 @@
{% extends 'landing/layout.html' %}
{% load i18n %}
{% load cache %}
{% block panel %}
<div class="block is-hidden-tablet">
<h2 class="title has-text-centered">{% trans "Recent Books" %}</h2>
</div>
{% cache 60 * 60 %}
<section class="tile is-ancestor">
<div class="tile is-vertical is-6">
<div class="tile is-parent">
@ -46,5 +48,5 @@
</div>
</div>
</section>
{% endcache %}
{% endblock %}

View file

@ -1,8 +1,6 @@
""" non-interactive pages """
from django.template.response import TemplateResponse
from django.views import View
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page
from bookwyrm import forms
from bookwyrm.views import helpers
@ -33,7 +31,6 @@ class Home(View):
class Landing(View):
"""preview of recently reviewed books"""
@method_decorator(cache_page(60 * 60), name="dispatch")
def get(self, request):
"""tiled book activity page"""
data = {