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

View file

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