i find solutio 
using https://docs.djangoproject.com/en/1.9/topics/pagination/ thnX

Τη Τρίτη, 26 Ιανουαρίου 2016 - 3:10:06 μ.μ. UTC+2, ο χρήστης pa xapy έγραψε:
>
> you want to paginate both querysets at the same page? 
> i believe it's a pretty strange idea and if so, you should think how to 
> refactor it
> if you want only paginate posts, i'll recommend you to use 
> django-pagination app of some sort, it's can be used in template
>
> On Monday, January 25, 2016 at 5:16:31 PM UTC+3, Xristos Xristoou wrote:
>>
>> i want to using Paginator in my main page for my post list. i see docs 
>> and examples for that but i thing my problem is a specific, because on my 
>> view i have two Querys not one.
>>
>>
>> def index(request):
>>     return render_to_response("blog/posts_list.html", {
>>         'categories': Category.objects.all(),
>>         'posts': 
>> Posts.objects.filter(publisheddate__lte=timezone.now()).order_by('-publisheddate')
>>     })
>>
>>
>> any idea how to use Paginator on my view ?
>>
>>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/58103c46-0740-48c8-8340-0a957c60c4da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to