0.12.49 fix push messages

This commit is contained in:
SDE
2024-05-07 11:43:58 +03:00
parent ec01d11426
commit e8e4bf466b
2 changed files with 4 additions and 4 deletions

View File

@@ -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))

View File

@@ -154,8 +154,8 @@ def StaticPageView(request, url):
'page': page, 'page': page,
}) })
from PushMessages.views import send_push # from PushMessages.views import send_push
send_push(user=request.user, title='title', text='text') # send_push(user=request.user, title='title', text='text')
t = loader.get_template('pages/p_static_page.html') t = loader.get_template('pages/p_static_page.html')
return get_inter_http_respose(t, Dict, request) return get_inter_http_respose(t, Dict, request)