How to connect to Firebase Database using sj-firebase-python 1.0.1 #3
Replies: 1 comment
-
@hardikfuria12 So the reason you are having that error is that here is a quick fix to your problem def get_list(self):
list = self.model.database.firebase_database.get_ref().child("customer") The reason you had the secon error was because sj-firebase-python/sjfirebase/jclass/database.py Lines 7 to 10 in e2b9ac6 You can use I would further advice you move the get list code into model instead of controller and then do something like this from controller self.model.get_list(callback=self.callback) |
Beta Was this translation helpful? Give feedback.
-
Wondering how to connect to Firebase Realtime Database using sj-firebase-python. I have been trying to connect using the documentation, but unable to do so.
What I am trying to do?
When user presses a dropdown menu show him a list of customers. This list is present in the Firebase Realtime Database, I want to populate this list in my dropdown menu.
I have been following the mvc4kivy framework. For simplicity and testing I am writing the code in controller code itself
My Control Code looks like
where firebase_database is SJFirebaseDatabase object. and customers is a document under https://project-url.asia-southeast1.firebasedatabase.app/
But when I run it on my andorid phone i get the following error.
Then I tried using the getInstance,
here it shows that this object does not have the method get_instance
Am I missing something?
Kindly help
Beta Was this translation helpful? Give feedback.
All reactions