1.0.6 push routines
This commit is contained in:
@@ -69,7 +69,7 @@ def get_inter_http_respose(template_obj, context_Dict, request):
|
|||||||
title = getattr(context_Dict['page'], 'title', None)
|
title = getattr(context_Dict['page'], 'title', None)
|
||||||
text = getattr(context_Dict['page'], 'description', None)
|
text = getattr(context_Dict['page'], 'description', None)
|
||||||
|
|
||||||
# if text and title and not request.user.is_anonymous:
|
if text and title and not request.user.is_anonymous:
|
||||||
# send_push(user=request.user, title=title, text=text)
|
send_push(user=request.user, title=title, text=text)
|
||||||
|
|
||||||
return HttpResponse(template_obj.render(context_Dict, request))
|
return HttpResponse(template_obj.render(context_Dict, request))
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load base_tags_extra %}
|
{% load base_tags_extra %}
|
||||||
|
{% load webpush_notifications %}
|
||||||
|
|
||||||
<div class="header_big_background">
|
<div class="header_big_background">
|
||||||
</div>
|
</div>
|
||||||
<header id="header_bg">
|
<header id="header_bg">
|
||||||
@@ -123,14 +125,15 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="menu_profile_btn">
|
<div class="menu_profile_btn">
|
||||||
<a class="btn_menu_profile" href="{% url "login_profile" %}" >{% trans "Войти" %}</a>
|
<a class="btn_menu_profile" href="{% url "login_profile" %}" >{% trans "Войти" %}</a>
|
||||||
<a class="btn_menu_profile" href="{% url "registration_page" %}">{% trans "Регистрация" %}</a>
|
<a class="btn_menu_profile" href="{% url "registration_page" %}">{% trans "Регистрация" %}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div style="text-align: right;">{% webpush_button %}</div>
|
||||||
<div class="clear_both"></div>
|
<div class="clear_both"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
{% load tt_chat %}
|
{% load tt_chat %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load webpush_notifications %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ request.LANGUAGE_CODE }}">
|
<html lang="{{ request.LANGUAGE_CODE }}">
|
||||||
@@ -10,6 +11,7 @@
|
|||||||
<meta name="viewport" content="width=device-width,maximum-scale=1,minimum-scale=1,initial-scale=1,height=device-height">
|
<meta name="viewport" content="width=device-width,maximum-scale=1,minimum-scale=1,initial-scale=1,height=device-height">
|
||||||
|
|
||||||
<meta name="vapid-key" content="{{ vapid_key }}">
|
<meta name="vapid-key" content="{{ vapid_key }}">
|
||||||
|
{% webpush_header %}
|
||||||
|
|
||||||
{% include "inter/meta_names.html" %}
|
{% include "inter/meta_names.html" %}
|
||||||
{# <script src='{% static "js/jquery_v3_6_4.js" %}'> </script>#}
|
{# <script src='{% static "js/jquery_v3_6_4.js" %}'> </script>#}
|
||||||
|
|||||||
Reference in New Issue
Block a user