On 29 May 2011 06:20, bahare hoseini <[email protected]> wrote: > hi there, > i followed the structure in > https://docs.djangoproject.com/en/dev/intro/tutorial01/ ,every thing was > allright till i wrote the code: >>> "p.choice_set.all()" , then i got > "AttributeError: 'function' object has no attribute choice_set" . :( > can somone help?! >
Psychic debugging: you previously typed: p = Poll.objects.get rather than p = Poll.objects.get(pk=1) If you did type the former, then p is a method reference and thus you would get the error above. Malcolm > -- > 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. > -- Malcolm Box [email protected] -- 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.

