How to use inspectdb to generate a model for a table owned by a specific schema.

瀏覽次數:1,017 次
跳到第一則未讀訊息

Nemani Srinivas Murthy

未讀,
2021年9月9日 上午10:10:082021/9/9
收件者:Django users
Hi, I'm looking for a solution for generating the model.py file for a table which is owned by a specific schema <schema>.<table>, I tried the below option but no luck.

python manage.py inspectdb --database= <DB_NAME> <SCHEMA.TABLE_NAME>


carlos

未讀,
2021年9月9日 上午10:13:182021/9/9
收件者:django...@googlegroups.com

On Thu, Sep 9, 2021 at 8:09 AM Nemani Srinivas Murthy <mr.n...@gmail.com> wrote:
Hi, I'm looking for a solution for generating the model.py file for a table which is owned by a specific schema <schema>.<table>, I tried the below option but no luck.

python manage.py inspectdb --database= <DB_NAME> <SCHEMA.TABLE_NAME>


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bc685fe7-93c8-4e35-b0d5-33bfe549169an%40googlegroups.com.


--
att.
Carlos Rocha

Hello Singh

未讀,
2021年9月10日 凌晨12:50:192021/9/10
收件者:django...@googlegroups.com
I am intermediate django developer, I want to give a try to your questions.
Simply use this command 
python manage.py inspectdb [ TABLE_NAME ]
If you use this command without table name it inspect all tables of database



On Thu, 9 Sep 2021, 19:39 Nemani Srinivas Murthy, <mr.n...@gmail.com> wrote:
Hi, I'm looking for a solution for generating the model.py file for a table which is owned by a specific schema <schema>.<table>, I tried the below option but no luck.

python manage.py inspectdb --database= <DB_NAME> <SCHEMA.TABLE_NAME>


回覆所有人
回覆作者
轉寄
0 則新訊息