1👍
✅
According to the comment you made on the other answer,
First version of our project is in php, we want to migrate to python-django and use the same old database. So we can’t create databases again and we should configure our django project to work with existing db.
You want to use an already existing legacy database in django. Django offers the possibility to create models out of your old db (legacy-databases).
Configure the db settings of your old database. Then you can run inspectdb
to create django models of your old database:
python manage.py inspectdb > models.py
3👍
Django supports several databases in one instance.
Also you can manually connect to DB in your python code.
For example:
import psycopg2
psycopg2.connect(...)
- [Django]-Hue installation issue
- [Django]-Adding javascript to an extended django template for google analytics
- [Django]-Coercing to Unicode: need string or buffer, int found – Django Rest Framework
Source:stackexchange.com