> Now the only thing is that when I call p.choice_set.all() I don't get the
representation 'The sky' or 'Just Hacking again' . I receive choice object
itself. Is this normal?
It should be said that yes, that is normal. p.choice_set.all() is a list of
Choice objects, not a list of strings
On Jan 27, 2013 10:58 PM, "Sayth Renshaw" wrote:
>
> Now the only thing is that when I call p.choice_set.all() I don't get the
representation 'The sky' or 'Just Hacking again' . I receive choice object
itself. Is this normal?
That happens because you seem to hsve missed
On Jan 27, 2013, at 6:53 PM, Sayth Renshaw wrote:
> Hi
>
> Just seeking a little clarification.
>
> In the Polls tutorial we get this section.
>
> >>> p = Poll.objects.get(pk=1)
>
> # Display any choices from the related object set -- none so far.
> >>> p.choice_set.all()
> []
>
> # Create
On Jan 27, 2013 5:58 PM, "Sayth Renshaw" wrote:
>
> Hi
>
> Just seeking a little clarification.
>
> In the Polls tutorial we get this section.
>
> >>> p = Poll.objects.get(pk=1)
>
> # Display any choices from the related object set -- none so far.
> >>> p.choice_set.all()
Hi
Just seeking a little clarification.
In the Polls tutorial we get this section.
>>> p = Poll.objects.get(pk=1)
# Display any choices from the related object set -- none so far.>>>
p.choice_set.all()[]
# Create three choices.>>> p.choice_set.create(choice_text='Not much',
votes=0)>>>
5 matches
Mail list logo