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)
|
||||
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))
|
||||
@@ -1,5 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% load base_tags_extra %}
|
||||
{% load webpush_notifications %}
|
||||
|
||||
<div class="header_big_background">
|
||||
</div>
|
||||
<header id="header_bg">
|
||||
@@ -123,14 +125,15 @@
|
||||
</div>
|
||||
|
||||
<div class="menu_profile_btn">
|
||||
<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 "login_profile" %}" >{% trans "Войти" %}</a>
|
||||
<a class="btn_menu_profile" href="{% url "registration_page" %}">{% trans "Регистрация" %}</a>
|
||||
</div>
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div style="text-align: right;">{% webpush_button %}</div>
|
||||
<div class="clear_both"></div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{% load static %}
|
||||
{% load tt_chat %}
|
||||
{% load i18n %}
|
||||
{% load webpush_notifications %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<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="vapid-key" content="{{ vapid_key }}">
|
||||
{% webpush_header %}
|
||||
|
||||
{% include "inter/meta_names.html" %}
|
||||
{# <script src='{% static "js/jquery_v3_6_4.js" %}'> </script>#}
|
||||
|
||||
Reference in New Issue
Block a user