Is it possible to generate django models from the database? -


I am roaming with Django and Django ORM at home, and I have to say, I think the ease of use One of the best in

However, I was wondering if it is possible to use it in "reverse".

What I really would like to do is generate the zango models from an existing database schema (a project that does not use a regiment and does not use the oldest).

Is this possible?

Update: Database Oracle in question

Yes , inspectdb command:

inspectdb

detects the database The tables in the database are indicated- from the settings of DATABASE_NAME and output a Django model module (a .py file) for standard output.

Use it if you have a legacy database with which you want to use the Django script database to inspect and will create a model for each table within it.

As you can expect, the built-in model table will have an attribute for each field. Note that the Inspectorate has some special cases in its field-name output:

[...]


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -