notification: add firebase notification to web
This commit is contained in:
10
config/firebase.py
Normal file
10
config/firebase.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import firebase_admin
|
||||
from firebase_admin import credentials, messaging
|
||||
from django.conf import settings
|
||||
import os
|
||||
|
||||
firebase_cred_path = os.path.join(settings.BASE_DIR, 'config/firebase/firebase-key.json')
|
||||
|
||||
if not firebase_admin._apps:
|
||||
cred = credentials.Certificate(firebase_cred_path)
|
||||
firebase_admin.initialize_app(cred)
|
||||
Reference in New Issue
Block a user