Tuesday, April 21, 2015

Re: Create models table from exists database?

El 21/04/15 03:15, Dario Concilio escribió:
Hi to all!
I'm new of django, I've a question for you: Can I create a new project using an exists database?

I've a domotic system on Ubuntu Server, with a Postgres database that has several table. Actually the system uses a table by a python service and PHP portal for data management of domotic configuration.

I would change portal admin with a "django" portal, can I create a new django project using this database?
Django framework allows me to generate the system tables and complete models (model.py) from existing ones?


Check Legacy databases in the official doc. This is what you're looking for:

python manage.py inspectdb

Cheers.

No comments:

Post a Comment