Use tables from database with creating models

19 views
Skip to first unread message

Rakhee Menon

unread,
Oct 16, 2018, 1:41:15 AM10/16/18
to Django users
Hi Everyone,
 

   As all my tables have been created in my old project I just want to access those tables using Django so without creating models how to access the table data?

   For eg: If PartyMaster is a table Using ORM one would have used it as PartyMaster.objects.get() however in the same manner how can I get or access data from database with models in Django??

  Thank You
  Regards
  Rakhee

Rakhee Menon

unread,
Oct 16, 2018, 1:52:41 AM10/16/18
to Django users


I am sorry ....by mistake at the end I asked a wrong question .....I meant to ask in the same manner how can I get or access data form database without models in Django ???Is there anyway in Django to access the data from tables without models??


Ігор Магур

unread,
Oct 16, 2018, 2:21:30 AM10/16/18
to django...@googlegroups.com
You can read how to generate models here: https://docs.djangoproject.com/en/2.1/howto/legacy-databases/ without models you'll need to write musch more code for managing and handling, and point of using django will be lost) 

вт, 16 жовт. 2018, 08:52 користувач Rakhee Menon <menonr...@gmail.com> пише:


I am sorry ....by mistake at the end I asked a wrong question .....I meant to ask in the same manner how can I get or access data form database without models in Django ???Is there anyway in Django to access the data from tables without models??


--
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/e4189bf0-f3ab-4bee-b2e0-6a293a306b68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rakhee Menon

unread,
Oct 17, 2018, 1:46:14 AM10/17/18
to Django users


Yes Thank You..

Joel

unread,
Oct 17, 2018, 1:57:19 AM10/17/18
to django...@googlegroups.com
Any reason why you hate models? 

On Wed, 17 Oct, 2018, 11:16 AM Rakhee Menon, <menonr...@gmail.com> wrote:


Yes Thank You..

--
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.

Rakhee Menon

unread,
Oct 17, 2018, 2:29:23 AM10/17/18
to Django users


No....There is nothing as such that I hate models...InFact  models have made our work easy...Its just that I am working on an old project where all the tables were created...which was not in django so I didn't knew how to access them without models...

Reply all
Reply to author
Forward
0 new messages