I have configured database properly. If I want to access the data from the table hello in the database called genes. What’s the proper way to do it? I can’t do from books.models import hello as I don’t have hello in models.py. The database genes and table hello is not the default Django database. I have two databases. I have already setup Router. I want to now access data. How can I do that? Thanks
I have configured database properly. If I want to access the data from the
Share
You need to do a few things..
settings.py
routers.py
One you have this set up then you need to create the models.py file for the
models.py
To do this progmatically..
Once this is done – you should be able to Query using standard Django querysets