if you'll decide to use some app for pagination, you can do it in template, 
like 
so https://github.com/ericflo/django-pagination/blob/master/docs/usage.txt 
({% autopaginate posts 10 %})
or you can choose one of 
these https://www.djangopackages.com/grids/g/pagination/
there is no actual need to do it in view
but still, if you want to only paginate posts, I can't see a problem at all

On Tuesday, January 26, 2016 at 4:27:58 PM UTC+3, Xristos Xristoou wrote:
>
> can you show me one examples with my view ?
>
> Τη Δευτέρα, 25 Ιανουαρίου 2016 - 4:16:31 μ.μ. UTC+2, ο χρήστης Xristos 
> Xristoou έγραψε:
>>
>> 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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/5d3687ed-64f8-43ce-a20c-43c45e957633%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to