Tuesday, January 26, 2016

Re: django pagination

are you familiar with the pip utility?
if not, i highly recommend to read about it https://pip.pypa.io/en/stable/quickstart/
if yes, you should know that you can install any application with pip install package_name
and how set it up with django - it's better if you read in instructions for package you choose

but i'm afraid that this particular app is too old and you can experience some troubles with it
anyways, you can try: pip install django-pagination

On Tuesday, January 26, 2016 at 4:44:05 PM UTC+3, Xristos Xristoou wrote:
one more question how to install this ?autopagination ?i dont see anything

Τη Δευτέρα, 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+unsubscribe@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/9a491e58-4f39-4ad0-b502-c1a52579855c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment