retriving all table from database

51 views
Skip to first unread message

vishal singh

unread,
Aug 6, 2019, 9:43:57 PM8/6/19
to django-d...@googlegroups.com
can anyone help me to pull all table name(schema wise ) from database  into  a dropdown.

it will be best if someone give codesnippits or examples , how to do??

Adam Johnson

unread,
Aug 7, 2019, 8:06:01 AM8/7/19
to django-d...@googlegroups.com
Hi!

I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer your support query with their limited time and energy. Read more on the mailing lists at https://www.djangoproject.com/community/

For support, please use the django-users mailing list, or IRC #django on Freenode, or a site like Stack Overflow. There are people out there willing to help on those channels, but they might not respond if you don't ask your question well. Stack Overflow's question guide can help you frame it well: https://stackoverflow.com/help/how-to-ask .

Also if you haven't read it, please take a look at Django's Code of Conduct: https://www.djangoproject.com/conduct/ . These are our "ground rules" for working well as a community, and will help you get the most out of Django and our fantastic community.

Quickly on your question: if you want to get all the *Django models* which represent database tables you'll want to look at iterating over the AppConfigs and getting the model classes from there: https://docs.djangoproject.com/en/2.2/ref/applications/ . If you want table names exactly, you can retrieve them from the model classes' _meta.db_table attribute.

Thanks for your understanding,

Adam

On Tue, 6 Aug 2019 at 15:26, vishal singh <singhvi...@gmail.com> wrote:
can anyone help me to pull all table name(schema wise ) from database  into  a dropdown.

it will be best if someone give codesnippits or examples , how to do??

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMSP2ackag-xH%3D2AN7NHVAsCsPRgp86qpGL0aoK1b%3DhT1K2JAw%40mail.gmail.com.


--
Adam

vishal singh

unread,
Aug 7, 2019, 12:16:40 PM8/7/19
to django-d...@googlegroups.com
please anyone help me out its urgent..

Confi Yobo

unread,
Aug 7, 2019, 2:11:32 PM8/7/19
to django-d...@googlegroups.com
Like Adam Johnson has said, i think you should use stackoverflow or any django facebook group for this post.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages