On Mon, May 25, 2009 at 10:07 PM, ds99 <cozydarsh...@gmail.com> wrote:
> > Hi, > I am new to django.I have a requirement where in have to access tables > which are not created using django models, using django APIs. > > For eg: I already have tables "book_111" and "book_222" created in > sqlite db by some different process. Both having same schema.I want to > access them to retrieve records using django database APIs. How can i > do that? > Do i need to add their schema in models.py? Can one model be used to > refer to multiple tables in database? > > Please let me know. > > Thanks, > ds99 > > > > Yes, you can use those models with django, you'll need to create Model classes for them though, http://docs.djangoproject.com/en/dev/ref/django-admin/#inspectdb can assist with this task. No one model can't be used to refer to multiple tables. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---