Re: basci question about queryset for retrieving top element

2012-04-17 Thread NENAD CIKIC
Thanks, I will check On 18 Apr, 04:34, HarpB wrote: > Like > thishttp://readthedocs.org/docs/django/en/latest/py-modindex.html?highlig... > or perhaps thishttp://djangoapi.quamquam.org/trunk/? > > There is also a great book:http://www.djangobook.com/en/2.0/ -- You received this message because

Re: basci question about queryset for retrieving top element

2012-04-17 Thread HarpB
Like this http://readthedocs.org/docs/django/en/latest/py-modindex.html?highlight=django or perhaps this http://djangoapi.quamquam.org/trunk/ ? There is also a great book: http://www.djangobook.com/en/2.0/ -- You received this message because you are subscribed to the Google Groups "Django us

Re: basci question about queryset for retrieving top element

2012-04-17 Thread NENAD CIKIC
OK, thanks Always learning. What I miss from my other programming is MSDN like style of help pages. I tend more and more to use the django pdf documentation because I can't get used to the web interface for this. On 17 Apr, 07:42, HarpB wrote: > Both patterns will produce same query. You can al

Re: basci question about queryset for retrieving top element

2012-04-16 Thread HarpB
Both patterns will produce same query. You can also use django-debug-toolbar, which gives ur debugsqlshell tool. So you can execute code from the commandline and can see what the query will be. Django also has a code pattern for your case - for getting the first element, you can just use latest

Re: basci question about queryset for retrieving top element

2012-04-16 Thread NENAD CIKIC
OK, thanks for sharing this On 16 Apr, 07:54, Pavan Verma wrote: > I am a Django newbie and also interested in this question. > > From reading the Django bookhttp://www.djangobook.com/en/2.0/chapter05/, > I see that the query 'Publisher.objects.order_by('name')[0:2]' maps > to: > > SELECT id, nam

Re: basci question about queryset for retrieving top element

2012-04-15 Thread Pavan Verma
I am a Django newbie and also interested in this question. >From reading the Django book http://www.djangobook.com/en/2.0/chapter05/, I see that the query 'Publisher.objects.order_by('name')[0:2]' maps to: SELECT id, name, address, city, state_province, country, website FROM books_publisher ORDER