Re: I don't get what Poll.objects.get(pk=1) does

2012-03-31 Thread Kisun Pokharel
hello, thanks. I wonder if it was caused by this error: ValueError: unknown locale: UTF-8 . It shows up but if I run the code again, it disappears..Otherwise, I have not made any mistakes and followed the tutorials .. -Kisun On Mar 31, 2012, at 11:38 PM, Sergiy Khohlov wrote: > look like all i

Re: I don't get what Poll.objects.get(pk=1) does

2012-03-31 Thread Sergiy Khohlov
look like all is correct. it will be nice to separate a working with database and python object. Using pk=1 you will get object with primary key equal 1. Also yo will try to worki wit object as with list... thanks, serge 2012/3/31 excalibur1491 : > Hi, > > I'm learning Django (I already kn

I don't get what Poll.objects.get(pk=1) does

2012-03-31 Thread excalibur1491
Hi, I'm learning Django (I already know Python) and I'm following the tutorial: https://docs.djangoproject.com/en/1.3/intro/tutorial01/ At the end of the tutorial there is a code where the programmer does: p = Poll.objects.get(pk=1) . I want to be sure if I understand it well. Poll.object.get(pk=1