Remove caching from common object templates

This commit is contained in:
Mark Veidemanis 2023-02-11 17:59:31 +00:00
parent 502556e7c3
commit 3d7c3504aa
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
2 changed files with 80 additions and 91 deletions

View File

@ -1,15 +1,11 @@
{% load cache %} {% include 'mixins/partials/notify.html' %}
{% if page_title is not None %}
{% cache 600 object request.user.id object %}
{% include 'mixins/partials/notify.html' %}
{% if page_title is not None %}
<h1 class="title is-4">{{ page_title }}</h1> <h1 class="title is-4">{{ page_title }}</h1>
{% endif %} {% endif %}
{% if page_subtitle is not None %} {% if page_subtitle is not None %}
<h1 class="subtitle">{{ page_subtitle }}</h1> <h1 class="subtitle">{{ page_subtitle }}</h1>
{% endif %} {% endif %}
<div class="buttons"> <div class="buttons">
{% if submit_url is not None %} {% if submit_url is not None %}
<button <button
@ -43,8 +39,6 @@
</span> </span>
</button> </button>
{% endif %} {% endif %}
</div> </div>
{% include detail_template %} {% include detail_template %}
{% endcache %}

View File

@ -1,14 +1,11 @@
{% load cache %} {% include 'mixins/partials/notify.html' %}
{% if page_title is not None %}
{% cache 600 objects request.user.id object_list %}
{% include 'mixins/partials/notify.html' %}
{% if page_title is not None %}
<h1 class="title is-4">{{ page_title }}</h1> <h1 class="title is-4">{{ page_title }}</h1>
{% endif %} {% endif %}
{% if page_subtitle is not None %} {% if page_subtitle is not None %}
<h1 class="subtitle">{{ page_subtitle }}</h1> <h1 class="subtitle">{{ page_subtitle }}</h1>
{% endif %} {% endif %}
<div class="buttons"> <div class="buttons">
{% if submit_url is not None %} {% if submit_url is not None %}
<button <button
@ -42,8 +39,6 @@
</span> </span>
</button> </button>
{% endif %} {% endif %}
</div> </div>
{% include list_template %} {% include list_template %}
{% endcache %}