On 29 May 2011 06:20, bahare hoseini <bhhose...@gmail.com> 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 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.
>



-- 
Malcolm Box
malcolm....@gmail.com

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

Reply via email to