I have a Firebase Firestore database connected to a Flutter mobile application. I want to build a web application to manage the users' data and handle new users. I have decided to use Django for my web application, but I have two questions if anyone can help.
First, is it actually reliable to use Django as the framework for this purpose? Second, I was trying to make a connection between Django and my existing DB to just try to call some values but I was getting this error:
google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or explicitly create credentials and re-run the application.
Here is the code I am using for the connection
db = firestore.Client()
config={
"apiKey": "******************",
"authDomain": "*******.firebaseapp.com",
"projectId": "*******",
"storageBucket": "*******.appspot.com",
"messagingSenderId": "*******",
"appId": "******************",
"databaseURL": "https://***********.firebaseio.com",
}
firebase = pyrebase.initialize_app(config)
auth = firebase.auth()
database = firebase.database()
def index(request):
doc = db.collection('test').document('test1').stream()
weight= doc['weight']
return render(request, 'index.html', {
"weight":weight,
})