get() si no existe coincidencia te tira error asi de simple.

2014-07-24 11:41 GMT-03:00 Daniel Roseman <dan...@roseman.org.uk>:

> 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+unsubscr...@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
> <https://groups.google.com/d/msgid/django-users/d80dc547-6194-4398-81d9-e93db01ca9cf%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
------------------------------------------------------------
Ricardo Daniel Quiroga - L2Radamanthys

   Msn: l2radamant...@gmail.com
           ricardo_q...@hotmail.com

   Email: l2radamant...@gmail.com
           l2radamant...@saltalug.org.ar
           ricardoquiroga....@gmail.com

   sitio Web: http://www.l2radamanthys.com.ar
                   http://github.com/L2Radamanthys

   Facebook: http://es-la.facebook.com/L2Radamanthys
   Twitter:    @l2Radamanthys
---------------------------------------------------------

-- 
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+unsubscr...@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/CAO2-wHZs4Zh2B2RgS%2BSfrDZLLHSUZ00tD37nFEFB-Ou1%3DB1swA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to