From 3d7c3504aa02dff3536ce11b8abd91b2f0b70ebe Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sat, 11 Feb 2023 17:59:31 +0000 Subject: [PATCH] Remove caching from common object templates --- .../mixins/window-content/object.html | 86 +++++++++---------- .../mixins/window-content/objects.html | 85 +++++++++--------- 2 files changed, 80 insertions(+), 91 deletions(-) diff --git a/mixins/templates/mixins/window-content/object.html b/mixins/templates/mixins/window-content/object.html index c27de2e..06eedc4 100644 --- a/mixins/templates/mixins/window-content/object.html +++ b/mixins/templates/mixins/window-content/object.html @@ -1,50 +1,44 @@ -{% load cache %} +{% include 'mixins/partials/notify.html' %} +{% if page_title is not None %} +

{{ page_title }}

+{% endif %} +{% if page_subtitle is not None %} +

{{ page_subtitle }}

+{% endif %} +
-{% cache 600 object request.user.id object %} - - {% include 'mixins/partials/notify.html' %} - {% if page_title is not None %} -

{{ page_title }}

- {% endif %} - {% if page_subtitle is not None %} -

{{ page_subtitle }}

- {% endif %} -
- - {% if submit_url is not None %} - - {% endif %} - {% if delete_all_url is not None %} - + {% endif %} + {% if delete_all_url is not None %} + - {% endif %} -
- - {% include detail_template %} + Delete all {{ context_object_name }} + + + {% endif %} +
-{% endcache %} \ No newline at end of file +{% include detail_template %} diff --git a/mixins/templates/mixins/window-content/objects.html b/mixins/templates/mixins/window-content/objects.html index 9092db6..5313ec4 100644 --- a/mixins/templates/mixins/window-content/objects.html +++ b/mixins/templates/mixins/window-content/objects.html @@ -1,49 +1,44 @@ -{% load cache %} +{% include 'mixins/partials/notify.html' %} +{% if page_title is not None %} +

{{ page_title }}

+{% endif %} +{% if page_subtitle is not None %} +

{{ page_subtitle }}

+{% endif %} +
-{% cache 600 objects request.user.id object_list %} - {% include 'mixins/partials/notify.html' %} - {% if page_title is not None %} -

{{ page_title }}

- {% endif %} - {% if page_subtitle is not None %} -

{{ page_subtitle }}

- {% endif %} -
- - {% if submit_url is not None %} - - {% endif %} - {% if delete_all_url is not None %} - + {% endif %} + {% if delete_all_url is not None %} + - {% endif %} -
- - {% include list_template %} + Delete all {{ context_object_name }} + + + {% endif %} +
-{% endcache %} \ No newline at end of file +{% include list_template %}