[英]How can I connect Firebase DB to Django project in Python
Do you know whether it is possible to connect to the Firebase database through the Django framework in Python instead of SQL, SQLLite3, or PostgreSQL, etc.,
如果可以將 Firebase DB 連接到 Django,任何人都可以幫助我將 Firebase DB 連接到 Django 嗎?
做你的進口
import firebase_admin
from firebase_admin import credentials, messaging
from firebase_admin import firestore
#initialize firebase en firestore 數據庫
json_file = //the json from firebase"
cred = credentials.Certificate(json_file)
firebase_admin.initialize_app(cred)
#initialize de 數據庫firestore
db = firestore.client()
在此之后它啟動並運行
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.