Re: template for "Pagination for admin inlines" snippet

2013-02-06 Thread Axel Rau
Am 05.02.2013 um 22:16 schrieb Conor Pollock: > I'm currently trying to figure this out as well... I can pass a page query > in the url and everything works as expected, but I can't figure out how to > render the pagination controls in my template file. > > Did you

Re: how pass get parameter django bootstrap pagination

2015-03-06 Thread Collin Anderson
Hi, If you have the request context processor installed, you can do this: {% bootstrap_paginate object_list range=request.GET.range %} Collin On Thursday, March 5, 2015 at 4:35:33 AM UTC-5, SHINTO PETER wrote: > > {% load bootstrap_pagination %} > {% bootstrap_paginate object_list range=10 %

Pagination is not showing and also not working

2017-02-12 Thread Kazi Atik
here is my views/ from django.contrib.auth.models import User from django.core.paginator import Paginator,EmptyPage, PageNotAnInteger from friends.models import Friendship,UserProfile from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.shortcuts import render def das

Django form needs pagination and saved data - how????

2017-07-28 Thread Jim Illback
their practice account. To maintain user inputted checkboxes on multiple pages, I must use POST. But, pagination only uses GET. So, a hack on pagination is to wrap the Next/Previous buttons in a sub-form and POST using the buttons. This works for pagination, but then my normal “I’m done, submit

List with pagination, sorting and simple search interface

2007-07-23 Thread Pigletto
Hi! I need to implement list (grid) with pagination, sorting and simple search interface. I've looked at djangosnippets, generic list etc, but so far I didn't find something that has all of these things. So my question is if there are any ready components that allows to simply create

Newforms and GET Requests for Search Result Pagination?

2007-07-30 Thread [EMAIL PROTECTED]
Greetings, Is it not possible to use Newforms with GET requests? I'm trying to figure out how to paginate results from a search form, and I'm passing GET values to the pagination view, instantiating an instance of the Form object with request.GET as an argument (instead of t

Re: randomizing objects in the view with pagination

2020-07-12 Thread MUGOYA DIHFAHSIH
on the platform > with hundreds of sellers. > > I was randomizing the product category page when loaded so that items from > all sellers could appear on the page. > > I was not using paginations and I have thousands of products so the page > was obviously loading very slow. >

Re: randomizing objects in the view with pagination

2020-07-12 Thread Damanjeet Singh
on the page. >> >> I was not using paginations and I have thousands of products so the page >> was obviously loading very slow. >> >> I added pagination and let python manage the query instead of it >> happening on the server-side. This increased the page load but

Searchform with pagination and GET parameters - easy solution needed

2009-08-05 Thread tom
Hi folks, i want to build a searchform (with GET parameters) and also want to use pagination. But i can't find an easy solution for this common case. My solution has a searchform, a view and a template. Can anybody tell me if this is a good solution? I'm not sure because i fi

Re: Export to excel sheet in djanogo using pagination

2009-04-24 Thread Tim Chase
> I have many pages to be exported to the excel sheet. I use django and > javascript. > i use pagination. Can any one help me out ? Just create a custom view that returns apropos content/headers. There are several ways of exporting files that Excel can read. CSV files: == +eas

Any way to serialize a pagination object in Django?

2009-12-11 Thread jul
hi, I'm using Django pagination with jQuery. I can serialize the objects list of the pagination object, but I'd like to serialize the whole object to get more data (page number, total number of pages...). How can I serialize the whole pagination object? Thanks ***javascript***

Re: Does django's built-in comments component support pagination?

2012-09-23 Thread Pablo Sanfilippo
https://docs.djangoproject.com/en/dev/topics/pagination/?from=olddocs#using-paginator-in-a-view This is a perfect example. You have to replace de model by the model of your comments. On Sunday, September 23, 2012 11:12:10 AM UTC-3, Scarl wrote: > > I wonder is it possible to disp

Re: Does django's built-in comments component support pagination?

2012-09-23 Thread Scarl
Should I rewrite django.contrib.comments.models? Or I just need to rewrite my_django_project.myapp.models? 在 2012年9月23日星期日UTC+8下午10时38分41秒,Pablo Sanfilippo写道: > > > https://docs.djangoproject.com/en/dev/topics/pagination/?from=olddocs#using-paginator-in-a-view > This > is a

Re: Does django's built-in comments component support pagination?

2012-09-23 Thread Pablo Sanfilippo
Sorry, i thought that views handle comments. I see now that comments are handled by the framework itself. El domingo, 23 de septiembre de 2012 11:12:10 UTC-3, Scarl escribió: > > I wonder is it possible to display 10 comments on one page? If it can, how > to do it? Using the django.core.paginat

Re: Does django's built-in comments component support pagination?

2012-09-23 Thread Scarl
Thanks for the answer! I have found something on django's official website. https://code.djangoproject.com/ticket/18143 It seems that the comments component are not paginateable with django's own paginator... 在 2012年9月24日星期一UTC+8上午1时28分45秒,Pablo Sanfilippo写道: > > Sorry, i thought that views ha

Re: Pagination is not showing and also not working

2017-02-14 Thread Kazi Atik
On Monday, February 13, 2017 at 1:03:23 AM UTC+5:30, Kazi Atik wrote: > > here is my views/ > > from django.contrib.auth.models import User > > from django.core.paginator import Paginator,EmptyPage, PageNotAnInteger > from friends.models import Friendship,UserProfile > from django.http import Htt

Re: Django form needs pagination and saved data - how????

2017-07-30 Thread James Schneider
r the full category or individual flashcards to be added to their practice account. To maintain user inputted checkboxes on multiple pages, I must use POST. But, pagination only uses GET. So, a hack on pagination is to wrap the Next/Previous buttons in a sub-form and POST using the buttons. This

Re: Django form needs pagination and saved data - how????

2017-07-30 Thread Jim Illback
semi-static forms flow path (form1, form2, …, formlast). Generally, when you do pagination, there is no preset number of pages - it depends upon the data being requested or available. So, I think that option would not work. But, if I’m wrong, I’d love to know. Thanks. And, as for using Java just so

Re: Django form needs pagination and saved data - how????

2017-07-30 Thread James Schneider
27;s how you're supposed to program in JS? Been doing it that way for years. ;-) I may be mistaken, but I think the wizard link below requires a “static” or semi-static forms flow path (form1, form2, …, formlast). Generally, when you do pagination, there is no preset number of pages - it depends

Re: Django form needs pagination and saved data - how????

2017-07-31 Thread Jim Illback
ken, but I think the wizard link below requires a “static” or semi-static forms flow path (form1, form2, …, formlast). Generally, when you do pagination, there is no preset number of pages - it depends upon the data being requested or available. So, I think that option would not work. But, if I’m

The last records of table by using of Pagination

2008-01-11 Thread Nader
Hello, I use a view in an application with which I can present the 20 pages of a table at once. from queues.models import Queue def list(request, page=0, message=" "): page = int(page) q_list = ObjectPaginator(Queue.objects.all(), 20) has_previous = q_list.has_previous_page(page)

Re: List with pagination, sorting and simple search interface

2007-07-23 Thread Sydney Weidman
I don't think there are pre-made components that will provide you with all of those things, and being somewhat new to django I can only point you to one bit of documentation and code that I found helpful for pagination: http://code.djangoproject.com/wiki/PaginatorTag Regards, Syd On Jul

Re: List with pagination, sorting and simple search interface

2007-07-24 Thread Pigletto
> I don't think there are pre-made components that will provide you with > all of those things, and being somewhat new to django I can only point > you to one bit of documentation and code that I found helpful for > pagination: > > http://code.djangoproject.com/wiki/Pagin

Re: List with pagination, sorting and simple search interface

2007-07-24 Thread Przemek Gawronski
- > sort, filter and pagination should > know about others parameters, eg. while sorting you shouldn't lost > filter parameters etc. Maybe you could put it at djangosnippets for others? I would be more then happy to take a look at it :) Przemek -- AIKIDO TANREN DOJO - Poland - Warsaw

Re: Newforms and GET Requests for Search Result Pagination?

2007-07-30 Thread RajeshD
ch form, and I'm passing > GET values to the pagination view, instantiating an instance of the > Form object with request.GET as an argument (instead of the typical > request.POST). I can't find any mention of GET support in the > documentation, is this something that will eventu

Re: Newforms and GET Requests for Search Result Pagination?

2007-07-30 Thread [EMAIL PROTECTED]
it any "dictionary-like" object instance as its > submitted data (request.GET and request.POST are both dictionary-like > objects.) > > > I'm trying to > > figure out how to paginate results from a search form, and I'm passing > > GET values to the

Re: List with pagination, sorting and simple search interface

2007-08-09 Thread Mary
anges) and > > Sortable Headers (from djangosnippets) with some changes too, newforms > > to createsearchform and generic list. > > Changes I had to do were necessary because each of those components - > > sort, filter and pagination should > > know about others parame

Pagination variable problem with generic list and limited queryset

2006-12-03 Thread Silas
I have a problem with generic.list_detail.object_list, a limiting queryset, and pagination variables. For some reason when I use the code below, results are restricted to the sliced 100, but all the pagination variables show results as if the slice wasn't there. Example: {{ pages }} = 12

Novice questions about Pagination syntax and classes in general

2019-06-01 Thread drone4four
As part of the official Django doc on Pagination <https://docs.djangoproject.com/en/2.2/topics/pagination/#using-paginator-in-a-view>, take a look at the listing function: def listing(request): contact_list = Contacts.objects.all() paginator = Paginator(contact_list, 25) # S

Pagination on different cards reside on the same template

2021-11-25 Thread Eugene TUYIZERE
Dear Team, I have 4 cards on a single html page. I want to display data on each one but since the data has many rows I want to apply pagination on each card. How can I achieve this? I was thinking of using ListView but this displays pagination on the whole page. I did not try any other codes

Re: Searchform with pagination and GET parameters - easy solution needed

2009-08-05 Thread Alex Gaynor
On Wed, Aug 5, 2009 at 10:03 AM, tom wrote: > > Hi folks, > > i want to build a searchform (with GET parameters) and also want to > use pagination. But i can't find an easy solution for this common > case. > My solution has a searchform, a view and a template. Can anyb

pagination problem with "Next" and saving results as a dictionary

2009-03-11 Thread Jesse
The following code is for a search on q and attaches tuples from the search on another model. The search results are appended together to create the final data results "list". def Bypub(request): query = request.POST['q'] if query: qset = ( Q(pubtitlestrip__icontains=q

django 1.3: how to use pagination with class based views?

2011-10-17 Thread Andriyko
Hello, I have following view in views.py: . class ArticleArchiveIndexView(ArticleViewAbstractClass, ArchiveIndexView): queryset = Article.live.all() date_field = 'pub_date' context_object_name = 'articles_list' paginate_by = ARTICLES_PER_PAGE .. How do I use 'paginate_by'

Casting a raw query set as a list for pagination

2013-03-26 Thread chambers24889
I'm trying to implement Django's built in pagination feature with a raw query set. I've researched the issue and the answer is I need to cast my set as a list. Something like this: paginator = Paginator(refg, 100) # Show 100 contacts per page paginator._count = len(list(r

What's the best way to create a reusable pagination template?

2017-02-27 Thread Frederik Creemers
The code for rendering pagination controls in my app is the same everywhere: {% if is_paginated %} {% if page_obj.has_previous %} Previous {% endif %} {% if page_obj.has_next %} Previous {% endif

An easier way to do this Pagination in a template?

2008-01-09 Thread Prof. William Battersea
Hello, On nearly every page of the website I'm creating, I have a list of recent articles in the sidebar that works as a complete archive. You can sort them by newest/oldest, and page through the entire archive. The template code for the pagination looks like this {% for page_number in page

Re: The last records of table by using of Pagination

2008-01-11 Thread shabda
instead of q_list = ObjectPaginator(Queue.objects.all(), 20) Provide a order_by, if you would like them to be in descending order, in order when they were created have, q_list = ObjectPaginator(Queue.objects.all().order_by('-id'), 20) Or better yet have a created_on field in the model, w

Re: Pagination variable problem with generic list and limited queryset

2006-12-04 Thread RajeshD
On Dec 3, 8:36 pm, "Silas" <[EMAIL PROTECTED]> wrote: > I have a problem with generic.list_detail.object_list, a limiting > queryset, and pagination variables. > > For some reason when I use the code below, results are restricted to > the sliced 100, but all the pa

Re: Pagination variable problem with generic list and limited queryset

2006-12-04 Thread Silas
Thanks for the explanation Rajesh. On Dec 4, 2:31 pm, "RajeshD" <[EMAIL PROTECTED]> wrote: > On Dec 3, 8:36 pm, "Silas" <[EMAIL PROTECTED]> wrote: > > > I have a problem with generic.list_detail.object_list, a limiting > > queryset, and paginati

Re: Novice questions about Pagination syntax and classes in general

2019-06-01 Thread John Bagiliko
8 AM drone4four wrote: > As part of the official Django doc on Pagination > <https://docs.djangoproject.com/en/2.2/topics/pagination/#using-paginator-in-a-view>, > take a look at the listing function: > > def listing(request): > contact_list = Contacts.objects.all() >

Re: Pagination on different cards reside on the same template

2021-11-25 Thread David Nugent
nce the data has many rows I want to apply pagination on each card. > How can I achieve this? I was thinking of using ListView but this displays > pagination on the whole page. I did not try any other codes because I have > no idea > > Kindly assist. > -- > *Eugene* > > >

Re: Pagination on different cards reside on the same template

2021-11-25 Thread Eugene TUYIZERE
ards, David > >> On Fri, Nov 26, 2021 at 6:41 AM Eugene TUYIZERE >> wrote: >> Dear Team, >> >> I have 4 cards on a single html page. I want to display data on each one but >> since the data has many rows I want to apply pagination on each card. How &

Re: pagination problem with "Next" and saving results as a dictionary

2009-03-11 Thread Micah Ransdell
Jesse, The error you are getting is from "q" not being in your post QueryDictionary. This happens because when you click next you are not rePOSTing the q variable. Either you can put the q variable into an input box and POST it again by making your next link a submit button, or you could change q

Re: pagination problem with "Next" and saving results as a dictionary

2009-03-12 Thread Jesse
rieve with a new view and use that view for the pagination. I can see that the pagination works better with a simple retrieval. Can you tell me how to create a new object from "list" that can be retrieved in a new view? Thanks. On Mar 11, 10:20 pm, Micah Ransdell wrote: > Jesse, &g

Re: pagination problem with "Next" and saving results as a dictionary

2009-03-12 Thread Jesse
Hello Micah, I tried this in the template: next The browser URL is: http://127.0.0.1:8000/Search/?q=?&page=2 and this in the template: next The browser URL is: http://127.0.0.1:8000/Search/?q=harris&page=2, which is correct for q, but the error for both is still: Request Method: GE

Re: pagination problem with "Next" and saving results as a dictionary

2009-03-12 Thread Micah Ransdell
Jesse, You need to change your code in the view to look at the GET parameter rather than POST. Change this line: query = request.POST['q'] to: query = request.GET['q'] Also, make sure when you are submitting to your search page that you are submitting the page with GET in the method of your fo

Re: pagination problem with "Next" and saving results as a dictionary

2009-03-13 Thread Jesse
Hello Micah, I can get the q with GET, but I have too complicated of a search and I need to use POST. I'm having much difficulty with my template code with POST to work with paginator. I'll keep trying. Thanks for your patience and help. --~--~-~--~~~---~--~~

Re: pagination problem with "Next" and saving results as a dictionary

2009-03-13 Thread pkenjora
Uhm maybe this post will help its a tag that handles the pagination on query objects. I've used it in a few of my projects and its quite handy. http://blog.awarelabs.com/?p=29 -Paul On Mar 13, 12:13 pm, Jesse wrote: > Hello Micah, > > I can get the q with GET, but I have t

Re: pagination problem with "Next" and saving results as a dictionary

2009-03-16 Thread Jesse
Hello Paul, Thanks!! I'll try it. On Mar 13, 2:21 pm, pkenjora wrote: > Uhm maybe this post will help its a tag that handles thepaginationon > query objects.  I've used it in a few of my projects and > its quite handy. > > http://blog.awarelabs.com/?p=29 > > -Paul > > On Mar 13, 12:13 pm,

Re: django 1.3: how to use pagination with class based views?

2011-10-17 Thread Andriyko
Ok. page_obj is what I need. On Oct 17, 10:34 pm, Andriyko wrote: > Hello, > > I have following view in views.py: > . > class  ArticleArchiveIndexView(ArticleViewAbstractClass, > ArchiveIndexView): >     queryset = Article.live.all() >     date_field = 'pub_date' >     context_object_name = '

Does pagination has to load all objects before showing the pages?

2012-10-17 Thread Bastian
I need to paginate a list of images that is getting bigger and bigger and is loading slowly. I tried the simple django-pagination module but even the first page takes as long as the whole list to load. I was wondering where to look but then thought maybe this pagination app only takes the whole

Re: Casting a raw query set as a list for pagination

2013-03-26 Thread Bill Freeman
7;m trying to implement Django's built in pagination feature with a raw > query set. I've researched the issue and the answer is I need to cast my > set as a list. Something like this: > > paginator = Paginator(refg, 100) # Show 100 contacts per page > paginator._count = len

Re: What's the best way to create a reusable pagination template?

2017-02-28 Thread fabrixxm
Yep. My solution is a custom template tag from django.template.defaulttags import register from urllib.parse import urlencode @register.simple_tag(takes_context=True) def querystringmod(context, *args): """Modify current querystring: {% querystringmod name value [name value [...]] %}

Re: Casting a raw query set as a list for pagination

2014-04-26 Thread Matt Buck
I've created a paginator for RawQuerySets. https://github.com/seamusmb/django-paginator-rawqueryset On Tuesday, March 26, 2013 5:51:41 AM UTC-4, chambe...@gmail.com wrote: > > I'm trying to implement Django's built in pagination feature with a raw > query set. I've

Re: An easier way to do this Pagination in a template?

2008-01-09 Thread Malcolm Tredinnick
ntire archive. > The template code for the pagination looks like this > > {% for page_number in page_list %} > > {% ifnotequal page_number current_page %} > > href="?p={{ page_number }}&sort={{sort_order}}">{{page

Re: An easier way to do this Pagination in a template?

2008-01-09 Thread Rock
lliam Battersea" <[EMAIL PROTECTED]> wrote: > Hello, > > On nearly every page of the website I'm creating, I have a list of recent > articles in the sidebar that works as a complete archive. You can sort them > by newest/oldest, and page through the entire archive. The temp

Re: An easier way to do this Pagination in a template?

2008-01-09 Thread Prof. William Battersea
ote: > > Hello, > > > > On nearly every page of the website I'm creating, I have a list of > recent > > articles in the sidebar that works as a complete archive. You can sort > them > > by newest/oldest, and page through the entire archive. The te

Re: An easier way to do this Pagination in a template?

2008-01-10 Thread Paul Childs
Take a look here too... http://code.djangoproject.com/wiki/PaginatorTag --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsu

Re: An easier way to do this Pagination in a template?

2008-01-10 Thread Prof. William Battersea
Ahh. I eventually did write an inclusion tag. I see I could have saved myself some time, but it was nice to learn how to do it. Thanks! On Jan 10, 2008 9:53 AM, Paul Childs <[EMAIL PROTECTED]> wrote: > > Take a look here too... > > http://code.djangoproject.com/wiki/PaginatorTag > > > --~--~---

how to use django pagination with sql query and not ORM

2019-09-24 Thread leb dev
I now how to use django pagination with ORM django after filtering the required data and put in into *pagination div* *queryset_list = employee.objects.all()* *query=request.GET.get("q")* *if query:* *queryset_list=queryset_list.filter(* * Q(name__icont

Django CMS and template tags (is it a problem with pagination mechanism?)

2009-02-22 Thread Theme Park Photo, LLC
block content %} Hello {% end block %} All I see when I render the page (go to the URL based on the slug I entered in django-cms) is FOO I think it has to do with the pagination template tags it's wrapping around my content before handing it off to the templat

I have a problem with the pagination with haystack and apache solr

2010-04-19 Thread Ariel
Hi everybody: I have a big problem with pagination using apache solr and haystack, this is what it is happening: I have a site where the news are being indexing with haystack and solr, but the problem is that when a I make the search the pagination is showing me more match results that what really

Re: Does pagination has to load all objects before showing the pages?

2012-10-17 Thread Bill Freeman
Look for somewhere that you're evaluating the queryset. Pagination doesn't need to evaluate it, since it can slice it, which turns into a start and a limit on the database side. Beware of using len() on a queryset (evaluates, IIRC), use qs.count() instead (done on the DB). On Wed, Oc

how to handle a zero-based pagination in templates as one-based?

2007-12-20 Thread Julian
hi there, I do want to use pagination, but I don't know how to solve a problem. template-code: {% for p in paginator.page_range %} {{p}} {% endfor %} but obviously it should be: {% for p in paginator.page_range %} {{p}} {% endfor %} because in my-view I use the objectpaginator object

Re: how to use django pagination with sql query and not ORM

2019-09-24 Thread Deep Sukhwani
_staff`, `auth_user`.`is_active`, `auth_user`.`date_joined` FROM `auth_user` WHERE `auth_user`.`username` LIKE BINARY %alpha% 1: https://docs.djangoproject.com/en/2.2/topics/db/sql/#performing-raw-queries -- Regards Deep L Sukhwani On Wed, 25 Sep 2019 at 00:47, leb dev wrote: > I now how

Re: Django CMS and template tags (is it a problem with pagination mechanism?)

2009-02-22 Thread Donn
On Sunday, 22 February 2009 21:00:24 Theme Park Photo, LLC wrote: > {% block content %} > Hello > {% end block %} It's not this extra space between end and block is it? \d -- Where I web: http://otherwise.relics.co.za/ Comics, tutorials, software and sundry --~--~-~--~~

Re: Django CMS and template tags (is it a problem with pagination mechanism?)

2009-02-22 Thread Theme Park Photo, LLC
No! It was the fact that you really need all the stuff that's on the sample template On Feb 22, 2:29 pm, Donn wrote: > On Sunday, 22 February 2009 21:00:24 Theme Park Photo, LLC wrote: > > {% block content %} > > Hello > > {% end block %} > > It's not this extra space between end and block i

is this a sane way to show total number of objects in pagination?

2009-09-24 Thread Chris Withers
Hi All, I have the following in a view: objects = model.objects.all() paginator = Paginator(objects,10) return render_to_response( 'index.html',dict( objects = paginator.page(page), total_objects = len(objects), ) ) Is that

Re: I have a problem with the pagination with haystack and apache solr

2010-04-21 Thread Massimiliano della Rovere
What happens if you switch pagination off? On Mon, Apr 19, 2010 at 19:29, Ariel wrote: > Hi everybody: > I have a big problem with pagination using apache solr and haystack, this is > what it is happening: I have a site where the news are being indexing with > haystack and s

Re: I have a problem with the pagination with haystack and apache solr

2010-04-21 Thread Ray McBride
How many results are returned when you search using the solr admin interface? Are you using the code that I posted for you previously? Ray On Apr 19, 6:29 pm, Ariel wrote: > Hi everybody: > I have a big problem with pagination using apache solr and haystack, this is > what it is hap

Re: I have a problem with the pagination with haystack and apache solr

2010-04-22 Thread Ariel
using the code that I posted for you previously? > > Ray > > On Apr 19, 6:29 pm, Ariel wrote: > > Hi everybody: > > I have a big problem with pagination using apache solr and haystack, this > is > > what it is happening: I have a site where the news are being indexin

Re: I have a problem with the pagination with haystack and apache solr

2010-04-23 Thread Ray McBride
solr admin > > interface? > > > Are you using the code that I posted for you previously? > > > Ray > > > On Apr 19, 6:29 pm, Ariel wrote: > > > Hi everybody: > > > I have a big problem with pagination using apache solr and haystack, this > >

Re: I have a problem with the pagination with haystack and apache solr

2010-04-23 Thread Ariel
How many results are returned when you search using the solr admin > > > interface? > > > > > Are you using the code that I posted for you previously? > > > > > Ray > > > > > On Apr 19, 6:29 pm, Ariel wrote: > > > > Hi everybody: > >

Re: I have a problem with the pagination with haystack and apache solr

2010-04-23 Thread Ariel
gt; the index. >> > How could I know it ??? >> > Regards >> > Ariel >> > >> > >> > >> > >> > >> > On Wed, Apr 21, 2010 at 4:40 AM, Ray McBride >> wrote: >> > > How many results are returned when you sear

Re: I have a problem with the pagination with haystack and apache solr

2010-04-23 Thread Ray McBride
t; > the index. > > > How could I know it ??? > > > Regards > > > Ariel > > > > On Wed, Apr 21, 2010 at 4:40 AM, Ray McBride > > wrote: > > > > How many results are returned when you search using the solr admin > > > > interface?

Re: I have a problem with the pagination with haystack and apache solr

2010-04-23 Thread Ray McBride
gt; > Regards > >> > Ariel > > >> > On Wed, Apr 21, 2010 at 4:40 AM, Ray McBride > >> wrote: > >> > > How many results are returned when you search using the solr admin > >> > > interface? > > >> > > Are you using

Re: how to handle a zero-based pagination in templates as one-based?

2007-12-20 Thread Brian Rosner
On 2007-12-20 14:33:47 -0700, Julian <[EMAIL PROTECTED]> said: > > hi there, > > I do want to use pagination, but I don't know how to solve a problem. > > template-code: > > {% for p in paginator.page_range %} > {{p}} > {% endfor %} > &g

Re: how to handle a zero-based pagination in templates as one-based?

2007-12-20 Thread Julian
okay, thanks. i think this will bring me to a comfortable solution. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscri

Django - Paginate with another GET request; not working with just pagination page number

2017-12-06 Thread Jack
I'm building a page with pagination and a filter form (2 GET requests). If the URL includes both pagination and filter results, something like `/questions/?page=2&all_questions=on`, it works fine. It also works if it just has filter results, something like `/questions/?all_que

Pagination breaks in ListView after migrating from Django 1.11 to 2.2 with SQLite

2019-04-23 Thread hodossy . szabolcs
ecute(sql, params) File "(...)\.env\lib\site-packages\django\db\utils.py", line 89, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "(...)\.env\lib\site-packages\django\db\backends\utils.py", line 84, in _execute return self.cursor.

Re: is this a sane way to show total number of objects in pagination?

2009-09-24 Thread Chris Withers
Chris Withers wrote: > objects = model.objects.all() > paginator = Paginator(objects,10) > return render_to_response( > 'index.html',dict( > objects = paginator.page(page), > total_objects = len(objects), > ) > ) I'm guessing

Re: is this a sane way to show total number of objects in pagination?

2009-09-24 Thread Brian McKeever
.count is definitely the way to go. Although, I would probably pass it to your template instead of determining it there. On Sep 24, 10:32 am, Chris Withers wrote: > Chris Withers wrote: > >      objects = model.objects.all() > >      paginator = Paginator(objects,10) > >      return render_to_re

Re: is this a sane way to show total number of objects in pagination?

2009-09-24 Thread Chris Withers
Brian McKeever wrote: > .count is definitely the way to go. Although, I would probably pass it > to your template instead of determining it there. What difference does it make? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co

Re: is this a sane way to show total number of objects in pagination?

2009-09-25 Thread Jani Tiainen
Chris Withers kirjoitti: > Brian McKeever wrote: >> .count is definitely the way to go. Although, I would probably pass it >> to your template instead of determining it there. > > What difference does it make? len(qs) evaluates queryset - thus pulling in _every_ object from DB to Python - which

Re: is this a sane way to show total number of objects in pagination?

2009-09-25 Thread Chris Withers
Jani Tiainen wrote: > Chris Withers kirjoitti: >> Brian McKeever wrote: >>> .count is definitely the way to go. Although, I would probably pass it >>> to your template instead of determining it there. >> What difference does it make? > > len(qs) evaluates queryset - thus pulling in _every_ object

Re: is this a sane way to show total number of objects in pagination?

2009-09-25 Thread Daniel Roseman
On Sep 25, 9:08 am, Jani Tiainen wrote: > Chris Withers kirjoitti: > > > Brian McKeever wrote: > >> .count is definitely the way to go. Although, I would probably pass it > >> to your template instead of determining it there. > > > What difference does it make? > > len(qs) evaluates queryset - th

Re: is this a sane way to show total number of objects in pagination?

2009-09-25 Thread Bryan
I can't think of a reason, if nothing else its a matter or taste/ preference. He said "I would probably...", so he may have been implying that there was a technical reason but most likely he was just stating his preference. On Sep 25, 5:03 am, Chris Withers wrote: > Jani Tiainen wrote: > > Chri

Re: is this a sane way to show total number of objects in pagination?

2009-09-25 Thread Brian McKeever
.count uses a sql function that just counts the rows. Doing len(model.objects.all()) pulls ALL of the objects from the database including all of the associated data and then counts them. It should be a significant performance difference for any large data set. On Sep 24, 11:12 am, Chris Withers

Re: is this a sane way to show total number of objects in pagination?

2009-09-25 Thread Brian McKeever
Oh, it's just a preference. I don't like calculating stuff in the template. It violates the MVT pattern to some minor degree. On Sep 25, 6:41 am, Bryan wrote: > I can't think of a reason, if nothing else its a matter or taste/ > preference.  He said "I would probably...", so he may have been > i

Pagination: how to find out on what page a give object will end up

2008-05-09 Thread VidJa Hunter
6. When a user jumps from page X to Y I would like to keep the pagination structure intact such that the user may paginate back and forth between page 1 and 6 to see what is in between. Basically this boils down to the following question: how to find out what the page number would be of specific obje

pagination of a specific context in multiple context in ListView not working in django?

2020-06-01 Thread Ali Ahammad
in django, i am trying to list some queries of several objects like user lists, categoies and Post list. the homepage will be contained couple of blocks or boxes. each box will have different query list like Post list, User List, category list. But only one context will have pagination and

Re: Pagination breaks in ListView after migrating from Django 1.11 to 2.2 with SQLite

2019-04-23 Thread Simon Charette
ends\utils.py", line > 76, in _execute_with_wrappers > return executor(sql, params, many, context) > File "(...)\.env\lib\site-packages\django\db\backends\utils.py", line > 84, in _execute > return self.cursor.execute(sql, params) > File "(...)\.

Re: Pagination breaks in ListView after migrating from Django 1.11 to 2.2 with SQLite

2019-04-24 Thread Szabolcs Hodossy
ute >> return self._execute_with_wrappers(sql, params, many=False, >> executor=self._execute) >> File "(...)\.env\lib\site-packages\django\db\backends\utils.py", line >> 76, in _execute_with_wrappers >> return executor(sql, params, many, context) >

Re: Pagination: how to find out on what page a give object will end up

2008-05-09 Thread Juanjo Conti
VidJa Hunter escribió: > > paginator.is_on_page(object) would return page 6 if object is element 31 of > the given queryset. > I am leaving right now, but, what about something like this? for page in paginator.page_range: if object in paginator.page(page).object_list: r

Re: pagination of a specific context in multiple context in ListView not working in django?

2020-06-02 Thread Hella Nick
list like Post list, > User List, category list. But only one context will have pagination and > other won't and ofcourse the pagination will be working on Post list. > > here is the views.py: > > class BlogappListView(ListView): > model = Category,CustomUs

Re: pagination of a specific context in multiple context in ListView not working in django?

2020-06-08 Thread Sunday Iyanu Ajayi
lists, categoies and Post list. the homepage will be contained couple of > blocks or boxes. each box will have different query list like Post list, > User List, category list. But only one context will have pagination and > other won't and ofcourse the pagination will be working on Post l

Search Page with Pagination, why do I need to refresh the page to see updated results?

2008-02-03 Thread boralyl
I'm using django and I have a search page that uses pagination. All works well, but if I change the search term the first page is fine, but if I go to the 2nd page I see results from the previous search. I must manually reload the page to see the 2nd page for the new search term. Is

<    1   2   3   4