On Wed, 11 Jul 2007 16:30:48 +1000, Malcolm Tredinnick wrote: >> On Wed, 11 Jul 2007 11:27:59 +0800, Russell Keith-Magee wrote: > [...] >> > - What happens when you run the following: from >> > django.contrib.auth.models import User print User.objects.all[0] >> :::::::::::::: >> output from python interpreter >> :::::::::::::: >> >>> from django.contrib.auth.models import User print >> >>> User.objects.all[0] >> Traceback (most recent call last): >> File "<stdin>", line 1, in ? >> TypeError: unsubscriptable object > > To save some time here: Russell made a typo. He really wants to know the > output of User.objects.all()[0] (the first element of the list of > objects). Note the extra parentheses there. > > Regards, > Malcolm ----------------- Hi Malcolm,
Yes, that was a typo. Adding the parentheses worked. Thanks, Shankar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

