workinblox
This commit is contained in:
parent
7361aeb4a9
commit
b49f59e7b6
@ -5,12 +5,13 @@ from django.views.decorators.http import require_GET, require_POST
|
||||
from django.shortcuts import render, get_object_or_404
|
||||
from webpush import send_user_notification
|
||||
from django.conf import settings
|
||||
from djangoldp_webpushnotification import models
|
||||
import json
|
||||
|
||||
|
||||
@require_GET
|
||||
def home(request):
|
||||
webpush_settings = getattr(settings, 'WEBPUSH_SETTINGS', {})
|
||||
vapid_key = webpush_settings.get('VAPID_PUBLIC_KEY')
|
||||
vapid_key = models.VAPIDKeyset.objects.first().public_key.decode("utf-8")
|
||||
user = request.user
|
||||
return render(request, 'home.html', {user: user, 'vapid_key': vapid_key})
|
||||
|
Loading…
Reference in New Issue
Block a user