Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

django-firebase-orm 0.6.1 test #7

Open
MrAch26 opened this issue Dec 16, 2020 · 4 comments
Open

django-firebase-orm 0.6.1 test #7

MrAch26 opened this issue Dec 16, 2020 · 4 comments
Labels
question Further information is requested

Comments

@MrAch26
Copy link

MrAch26 commented Dec 16, 2020

Hi
I am trying to use the package but not quite sure that I am using it well...
I have configured FIREBASE_ORM_CERTIFICATE and FIREBASE_ORM_BUCKET_NAME correctly but when I'm trying to use it in models and then python manage.py makemigrations nothing happened....
Do I need to use Firebase.ORM.models instead of django.db.models ? Or simply create another models.py ?
Do I need to create the collections in firestore before creating it ?
Do I need to change something with the database settings ?
I hope what I am saying make sense
I believe I am still a beginner in Django
Thanks a lot in advance for the help
Best
Daniel

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.75. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@issue-label-bot issue-label-bot bot added the question Further information is requested label Dec 16, 2020
@TralahM
Copy link
Owner

TralahM commented Dec 16, 2020

You need to inherit from firebase_orm.models

@TralahM
Copy link
Owner

TralahM commented Dec 16, 2020

Calling save on the object should create it in firestore

python manage.py makemigrations does nothing... database migrations are only relevant for sql databases

@MrAch26
Copy link
Author

MrAch26 commented Dec 17, 2020

Ok this is my model :

class Customer(models.Model):
    name = models.TextField()
    type_customer = models.TextField(db_column='type')
    
    class Meta:
        db_table = 'medications'

and the object i created is `Customer(name='daniel')

when i do a.save() i get this error -->

Screen Shot 2020-12-17 at 11 14 42

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants