How to I connect Django app to OCI Autonomous DB? #155
-
Im following along in the Django documentation and I want to connect the application for a Free Tier OCI DB that I have running. I am able to connect to the DB via VS Code and perform all the expected actions. But I would like it, so that when I do I would also like to be able to run packages/procedures from the app as well. Do I still have to create a connection to the database every time I want to do a query/insert/update? Something like this?
I have changed the section in settings.py to the following & I have OracleDB installed
Is there something I am missing? Also, I am working on a "3 GHz 6-Core Intel Core i5" desktop & a "Apple M1" laptop. Guidance on how to get this to work on both machines would be greatly appreciated! Please let me know if there is more information that is required! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
@suraj-ora-2020 can you comment? |
Beta Was this translation helpful? Give feedback.
-
Since you are able to connect you can use the following command to migrate all the tables. |
Beta Was this translation helpful? Give feedback.
-
Future readers may be interested in:
And since this discussion was first initiated, Instant Client for macOS ARM64 has been released if you need to use python-oracledb Thick mode: https://medium.com/@cjones-oracle/installing-oracle-instant-client-for-apple-macos-arm64-m1-m2-m3-2c81f246feb9 |
Beta Was this translation helpful? Give feedback.
Since you are able to connect you can use the following command to migrate all the tables.
python manage.py inspectdb > myapp/models.py
This will create the Objects based on the relational db.