On Nov 23, 8:31 pm, dash86no <[EMAIL PROTECTED]> wrote: > Is there no way to call all models implicitly. For example: > > from mysite.myapp import models > PS. I tried looking round the documentation. I found > this:http://www.djangobook.com/en/1.0/chapter08/ > > from django.conf.urls.defaults import * > from mysite import views
Yeah, you're on the right track. The analog to your example is: from mysite.myapp.models import * And since you're importing classes and not functions, as in the views example, you access your models directly, as Model1, Model2, etc. Also, this is a basic Python issue, so reading up on the Python documentation would help, too: http://www.python.org/doc/2.5.2/tut/node8.html Cheers. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---