Re: "django-pagination" and generic.views.date_based.archive_index()

2009-10-21 Thread tezro
Thanks again. Did it with object_list. Thanks for help :) On Oct 19, 2:16 pm, Михаил Лукин wrote: > Finally, I see only 3 ways: > 1. copy/paste archive index code and change it's behaviour so it can eat > num_latest=None > 2. patch date_based.py in same way as (1) > 3. use list_detail.object_lis

Re: "django-pagination" and generic.views.date_based.archive_index()

2009-10-19 Thread Михаил Лукин
Finally, I see only 3 ways: 1. copy/paste archive index code and change it's behaviour so it can eat num_latest=None 2. patch date_based.py in same way as (1) 3. use list_detail.object_list Since 1-2 are dirty, I would recommend 3rd way. I'll let you know if I could suggest something else :) 2009/

Re: "django-pagination" and generic.views.date_based.archive_index()

2009-10-19 Thread tezro
Surely I could use the list_detail.object_list, but the use of date based generics though )) On Oct 18, 11:45 pm, Михаил Лукин wrote: > Sorry, didn't look at condition well...:( > > So, you see the source and you see that there's no way to get all the > records with this view. > Why don't you u

Re: "django-pagination" and generic.views.date_based.archive_index()

2009-10-18 Thread Михаил Лукин
Sorry, didn't look at condition well...:( So, you see the source and you see that there's no way to get all the records with this view. Why don't you use list_detail.object_list view? If you need just to order list by date, you can use ordering on the model level: http://docs.djangoproject.com/en/

Re: "django-pagination" and generic.views.date_based.archive_index()

2009-10-18 Thread tezro
Would it? If "latest=None" doesn't it mean that there are no entries? By the way, if I pass None to the condition, it returns False, so latest is None. Or isn't it? Also the template cannot render it, cause "object of type 'NoneType' has no len()". Anyways, thanks for reply :) On Oct 18, 11

Re: "django-pagination" and generic.views.date_based.archive_index()

2009-10-18 Thread Mihail Lukin
Look at date_based.py: if date_list and num_latest: latest = queryset.order_by('-'+date_field)[:num_latest] else: latest = None So, if you use num_latest=None, you will always get the whole list. On Aug 30, 2:47 pm, tezro wrote: > Anyone? > > On Aug 14, 8:29 am, tezro

Re: "django-pagination" and generic.views.date_based.archive_index()

2009-08-30 Thread tezro
Anyone? On Aug 14, 8:29 am, tezro wrote: > The question is that "django.views.generic.date_based.archive_index()" > takes an optional argument "num_latest" which is 15 by default. > Setting it manually to num_latest=10 is way off to correct to > me. It works. I suppose that it even doesn

"django-pagination" and generic.views.date_based.archive_index()

2009-08-13 Thread tezro
The question is that "django.views.generic.date_based.archive_index()" takes an optional argument "num_latest" which is 15 by default. Setting it manually to num_latest=10 is way off to correct to me. It works. I suppose that it even doesn't retrieve all the tons of data from the DB, but w