From 2f421bb0ac255464828d5e3a91e7450e1ff33f32 Mon Sep 17 00:00:00 2001 From: SDE Date: Wed, 8 May 2024 11:23:01 +0300 Subject: [PATCH 1/2] 1.0.6 push routines --- GeneralApp/funcs.py | 4 ++-- templates/blocks/b_header.html | 7 +++++-- templates/tb_base.html | 2 ++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/GeneralApp/funcs.py b/GeneralApp/funcs.py index d4370b4..2169cd2 100644 --- a/GeneralApp/funcs.py +++ b/GeneralApp/funcs.py @@ -69,7 +69,7 @@ def get_inter_http_respose(template_obj, context_Dict, request): title = getattr(context_Dict['page'], 'title', None) text = getattr(context_Dict['page'], 'description', None) - # if text and title and not request.user.is_anonymous: - # send_push(user=request.user, title=title, text=text) + if text and title and not request.user.is_anonymous: + send_push(user=request.user, title=title, text=text) return HttpResponse(template_obj.render(context_Dict, request)) \ No newline at end of file diff --git a/templates/blocks/b_header.html b/templates/blocks/b_header.html index 57a9b6d..4dd0e2e 100644 --- a/templates/blocks/b_header.html +++ b/templates/blocks/b_header.html @@ -1,5 +1,7 @@ {% load i18n %} {% load base_tags_extra %} +{% load webpush_notifications %} +
@@ -123,14 +125,15 @@ {% endif %} +
{% webpush_button %}
diff --git a/templates/tb_base.html b/templates/tb_base.html index 3f2e4b1..cf56b9a 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -1,6 +1,7 @@ {% load static %} {% load tt_chat %} {% load i18n %} +{% load webpush_notifications %} @@ -10,6 +11,7 @@ + {% webpush_header %} {% include "inter/meta_names.html" %} {# #} From d6487d81c96e6cee2d91a055f703aca81bff4be3 Mon Sep 17 00:00:00 2001 From: SDE Date: Wed, 8 May 2024 11:33:24 +0300 Subject: [PATCH 2/2] 1.0.7 push routines --- GeneralApp/funcs.py | 4 ++-- templates/blocks/b_footer.html | 3 +++ templates/blocks/b_header.html | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/GeneralApp/funcs.py b/GeneralApp/funcs.py index 2169cd2..d4370b4 100644 --- a/GeneralApp/funcs.py +++ b/GeneralApp/funcs.py @@ -69,7 +69,7 @@ def get_inter_http_respose(template_obj, context_Dict, request): title = getattr(context_Dict['page'], 'title', None) text = getattr(context_Dict['page'], 'description', None) - if text and title and not request.user.is_anonymous: - send_push(user=request.user, title=title, text=text) + # if text and title and not request.user.is_anonymous: + # send_push(user=request.user, title=title, text=text) return HttpResponse(template_obj.render(context_Dict, request)) \ No newline at end of file diff --git a/templates/blocks/b_footer.html b/templates/blocks/b_footer.html index 7d4ec12..f878b7f 100644 --- a/templates/blocks/b_footer.html +++ b/templates/blocks/b_footer.html @@ -1,4 +1,5 @@ {% load i18n %} +{% load webpush_notifications %}