Thursday, July 24, 2014

Re: Problem in the Tutorial 01

On Thursday, 24 July 2014 13:53:54 UTC+1, Fabian Zentner wrote:
Hey guys,

I'm new with Django and Python as well. I'm doing the tutorial 1 on the website (https://docs.djangoproject.com/en/1.6/intro/tutorial01/).
I'm using Python27 (C:\Python27)
In C:\Python27\Scripts\ I have the project mysite and polls like in the tutorial

In the part "Playing with the API"

<snip>
 
>>> p.choice_set.all()
[<Choice: Choice object>, <Choice: Choice object>, <Choice: Choice object>, <Cho
ice: Choice object>, <Choice: Choice object>, <Choice: Choice object>]
>>> p.choice_set.count()
6

I get always Poll: Poll object or Choice: Choice object instead of the defined text. Also I have problems with the part of

p = Poll.objects.get(pk=1)
>>> p.was_published_recently()

Could somebody help me please? Before I start with the tutorial number 2...

Thanks a lot.

Fabian


After you make changes to the code,  you need to reload it: the easiest way is exit your shell and go back in.
-- 
DR.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d80dc547-6194-4398-81d9-e93db01ca9cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment