Re: Use tables from a database without creating models

7 views
Skip to first unread message

Glen D souza

unread,
Oct 17, 2018, 1:20:48 AM10/17/18
to django...@googlegroups.com
Hi,

If the Data Base is already present then Django provides an handy command which will translate your Database schemas into Django models

You have to run python manage.py inspectdb

It will auto generate the models based on the Schema.

Best way to access the data present in the db in the Django app is through models, i would not recommend accessing the data from database directly in any part of the app by using the db connection and writing sql queries

On Tue, 16 Oct 2018 at 10:56, Rakhee Menon <menonr...@gmail.com> wrote:
Hi,

The tables are already created in a project..I just want to use the tables ....so please could anyone  tell without  creating models how to access the table data.

Thanks in Advance

--
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 post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/077c2dc1-2792-43f0-90ed-788b678e9bca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages