moshthepitt / django-pagination Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/django-pagination
License: BSD 3-Clause "New" or "Revised" License
Automatically exported from code.google.com/p/django-pagination
License: BSD 3-Clause "New" or "Revised" License
is it possible to change the URLs from /foo/?page=42 to /foo/page/42/?
thanks!
Original issue reported on code.google.com by [email protected]
on 9 Feb 2009 at 9:46
Hi everyone,
I'm having some problems related to the python version that is running on my
server.
At the moment is python 2.3 and the pagination app is giving me a lot of
problems because it uses
sorted(), which is included in python 2.4+but not python 2.3.
Since Django is python 2.3 compatible, can you please make yout app compatible
as well?
It's quite easy actually, just a couple of lines.
Thanks in advance!
David
Original issue reported on code.google.com by [email protected]
on 3 Sep 2008 at 4:23
i made a german locale for my site, if you like you may add it too your repo.
Original issue reported on code.google.com by [email protected]
on 28 Jul 2008 at 11:34
Attachments:
django-pagination lacks a setup.py file, making it difficult to use in an
egg-based deployment.
(Even better would be a proper release onto PyPI!)
Original issue reported on code.google.com by dan.fairs
on 19 Oct 2008 at 6:11
When used with a view (for a search form) that uses Posts the first page is
fine, but the clicking on any of the paginator links just returns the view
of the form, not the results of the search.
This is because a GET is being used.
Should perhaps clarify in the documentation that only GETS are supported.
Thanks,
Original issue reported on code.google.com by [email protected]
on 15 Jan 2009 at 12:36
The attachment contains the French translation for django-pagination.
Original issue reported on code.google.com by [email protected]
on 23 Oct 2008 at 8:29
Attachments:
What steps will reproduce the problem?
1. I have installed django-pagination1.0.5
2. Modified settings.py accordingly to the video tutorial
3. wrote my template code
What is the expected output? What do you see instead?
expected output - paginated results
What version of the product are you using? On what operating system?
django-pagination1.0.5 on windows xp
Please provide any additional information below.
the error i got is :
Caught an exception while rendering: 'request'
Original Traceback (most recent call last):
File "C:\Python25\lib\site-packages\django\template\debug.py", line 71,
in render_node
result = node.render(context)
File
"c:\python25\lib\site-packages\django_pagination-1.0.5-py2.5.egg\pagination\temp
latetags\pagination_tags.py",
line 90, in render
page_obj = paginator.page(context['request'].page)
File "C:\Python25\lib\site-packages\django\template\context.py", line 43,
in __getitem__
raise KeyError(key)
KeyError: 'request'
Below i list my template code:
<ul>
{%if row %}
{%autopaginate row 4 %}
{% for item in row %}
<li>{{ item }}</li>
<br>
{% endfor %}
{% paginate %}
{% endif %}
</ul>
Original issue reported on code.google.com by [email protected]
on 9 Apr 2009 at 11:22
I sovled the problem by change pagination.middleware.PaginationMiddleware
as follows:
old code
--------
request.page = int(request.REQUEST['page'])
new code
--------
request.page = int(request.GET['page'])
Original issue reported on code.google.com by [email protected]
on 22 Oct 2008 at 2:47
Czech translation locale cs\django.po
Original issue reported on code.google.com by [email protected]
on 12 Jan 2009 at 12:13
Attachments:
Icelandic localization files
Original issue reported on code.google.com by [email protected]
on 12 Feb 2009 at 10:45
Attachments:
The pagination changes the order if the items from my object_list. I sent a
list with contains a set of movies whom has to be displayed to the user in
a particular order but pagination changed the order (i cannot figure out if
it did an order on a particular property)
Has anyone noticed that? Is there a workaround? I cannot figure out from
the code what can change the order of my items...
Thank you very much!
Regards,
Dorian
Original issue reported on code.google.com by [email protected]
on 27 Jan 2009 at 3:49
Russian translation attached
Original issue reported on code.google.com by [email protected]
on 31 Mar 2009 at 1:20
Attachments:
[deleted issue]
{% block foo %}
{% autopaginate object_list 2 %}
{% for do something %}
...
{% endfor %}
{% endblock %}
{% block bar %}
{% paginate %}
{% endblock %}
results in errors!
Caught an exception while rendering: 'NoneType' object has no attribute
'page_range'
Maybe I'm doing something wrong.
Original issue reported on code.google.com by onno%[email protected]
on 24 Nov 2008 at 1:05
What steps will reproduce the problem?
1. start application (pinax in this case) with python manage.py runserver ...
2. point your browser to address
What is the expected output? What do you see instead?
Expected: webpage
Instead: raw Errormessage - not handled by Django telling
TypeError: 'WSGIRequest' object is unsubscriptable
What version of the product are you using? On what operating system?
Trunk Pinax
Please provide any additional information below.
Extending middleware.py with TypeError
line 9 except (KeyError, ValueError, TypeError):
fixed the problem
rgds
g
Original issue reported on code.google.com by [email protected]
on 3 Aug 2008 at 9:25
Hi,
I think usage of django.core.paginator.Paginator is improper in
pagination_tags.py
Paginator class uses len(object) for counting number of objects in
queryset. So, queries like Article.objects.all() in view, will run very slooow.
I changed the Line 67 of pagination_tags.py to use QuerySetPaginator, and
result is as expected.
Original issue reported on code.google.com by [email protected]
on 12 Oct 2008 at 7:58
Attached is a hebrew translation
Original issue reported on code.google.com by [email protected]
on 7 Dec 2008 at 10:16
Attachments:
Hi!
the css class for the current page has a space.. this is not a valid css name.
example: <span class="current page">3</span>
another "issue": the names of the classes are very generic and it can
generate conflicts with another class names, can they have a prefix or similar?
Thanks!!
pd: i attach the file with my suggestions ;)
Original issue reported on code.google.com by [email protected]
on 24 Jul 2008 at 1:48
Attachments:
Can django-pagination be set to use dynamic number of rows ?
I assume it's {% autopaginate object_list X %}
Let's say there's a table and I would like to have "Show X records"
<select> displayed.
Thanks for the project!
Original issue reported on code.google.com by [email protected]
on 14 Nov 2008 at 5:28
Paginator and QuerySetPaginator are now the same thing, so there is no need
for QuerySet detection. This line:
value = list(value)
also kills any lazy loading objects that are not QuerySets (djangosearch,
django-sphinx etc), making it impractical to use them with django-pagination.
I have attached a patch which should fix both issues.
Original issue reported on code.google.com by [email protected]
on 29 Aug 2008 at 12:29
Attachments:
The README doesn't mention that users of django-pagination need to add the
TEMPLATE_CONTEXT_PROCESSORS list to their settings.py and make certain that
the request context_processor is in the list.
The screencast does demonstrate this step, though.
Original issue reported on code.google.com by [email protected]
on 17 Jul 2008 at 4:24
Currently there is no way to define orphans for the Paginator. There should
be a optional, third parameter to define them.
{% autopaginate object_list 10 1 %}
Original issue reported on code.google.com by [email protected]
on 15 Jul 2008 at 12:14
Attachments:
Seems to have been introduced in r38. I think line 148 needs to be changed back
to:
second_list = list(last)
Original issue reported on code.google.com by [email protected]
on 26 Oct 2008 at 3:04
Please add attached Slovenian translation.
Language_code = si
Thank you.
Original issue reported on code.google.com by [email protected]
on 26 Feb 2009 at 8:15
Attachments:
Current use of autopaginate tag expects existing separate queryset
variable. But in my case I didn't have variable. I had a function. In
another words I should write following:
{% autopaginate object.image_set.all %}
But how to iterate over result?
So I added one more parameter to this tag and used it in another way:
{% autopaginate object.image_set.all as images %}
And than I can iterate over "images".
The patch is attached. I hope it will help to improve your app. Thanks.
Original issue reported on code.google.com by [email protected]
on 15 Sep 2008 at 9:11
Attachments:
I'm getting
Caught an exception while rendering: 'request'
Original Traceback (most recent call last):
File "/Users/xx/django/template/debug.py", line 71, in render_node
File
"/Users/xx/django-pagination-svn-trunk/pagination/templatetags/pagination_tags.p
y",
line 69, in render
page_obj = paginator.page(context['request'].page)
File "/Users/xx/django/template/context.py", line 43, in __getitem__
KeyError: 'request'
error,
Original issue reported on code.google.com by [email protected]
on 4 Oct 2008 at 9:35
i would like it if i could set the default pagination site wide (20 is a
little big for me). heres the patch i use
Original issue reported on code.google.com by [email protected]
on 28 Jul 2008 at 11:37
Attachments:
What steps will reproduce the problem?
1. Installed django-pagination
2. followed steps for setup
3. watched tutorial and set up settings.py exactally like the video
What is the expected output? What do you see instead?
Expected to see page templated rendered with 25 results. Instead I get the
error message "Caught an exception while rendering: 'request'"
What version of the product are you using? On what operating system?
Using verison 1.0.5 on Windows Vista
Please provide any additional information below.
I followed the advice in Issue 20 and added "from django.template import
RequestContext" to the view.py and 'django.core.context_processors.request'
is added in Template_Context_Processors. I have no idea why this is not
working.
Here is my template
11
12 <p>The number of records: {{lobbyists|length}} </p>
13
14 {% endif %}
15
16 <p> This table contains all firms and individuals who lobbied on behalf
of {{country}}.</p>
17
18 <table border ="2">
19
20 <th>Firm</th><th>Client</th><th>Country</th><th>Amount</th><th>Type of
Lobbying</th><th>Year</th>
21 {% autopaginate lobbyists 25 %}
22 {% for lobbyist in lobbyists %}
23 <tr>
24 <td><a
href="{{lobbyist.reg_cd.get_absolute_url}}">{{lobbyist.reg_cd}}</a></td>
25 <td><a
href="{{lobbyist.fp_cd.get_absolute_url}}">{{lobbyist.fp_cd}}</a></td>
26 <td>{{lobbyist.country}}</td>
27 <td>{{lobbyist.financial_amount}}</td>
28 <td><a
href="{{lobbyist.act_type.get_absolute_url}}">{{lobbyist.act_type}}</a></td>
29 <td>{{lobbyist.year}}</td>
30 </tr>
31
Original issue reported on code.google.com by [email protected]
on 23 Apr 2009 at 3:02
The attachment contains the Spanish translation for django-pagination.
Original issue reported on code.google.com by [email protected]
on 14 Dec 2008 at 1:03
Attachments:
Please find attached Polish localization. This is complete PO file.
Original issue reported on code.google.com by [email protected]
on 20 Oct 2008 at 6:59
Attachments:
I propose to rename the distutils/setuptools package of django-pagination from
"pagination" to
"django-pagination". That would allow to type easy_install django-pagination.
See also the list of other apps already registered under that name prefix:
http://pypi.python.org/pypi?%3Aaction=search&term=django-
Original issue reported on code.google.com by leidel
on 25 Oct 2008 at 4:07
What steps will reproduce the problem?
1. {% autopaginate object_list 10 %} + {% paginate %}
2. only 9 objects
3. got to ?page=2 or 0, only 1 works
What is the expected output? What do you see instead?
'NoneType' object has no attribute 'page_range'
the error only occurs when i use {% paginate %}
What version of the product are you using? On what operating system?
svn from today (28.7.2008)
Please provide any additional information below.
this is not a crucial bug, but imho a site should be safe against wrong GET
paramters ;))
except this little but, a very nice piece of software. thanks!
Original issue reported on code.google.com by [email protected]
on 28 Jul 2008 at 10:57
Currently there is no way to define default-settings in the global
settings.py. This is like issue #10 but with full control over all settings.
Original issue reported on code.google.com by [email protected]
on 13 Aug 2008 at 8:30
Attachments:
If you type an invalid page number (e.g. ?page=3450) the paginator returns
the full list of objects. I would suggest to return an empty list and a key
like "invalid_page" to mark it.
So my template looks like this now:
{% autopaginate object_list 10 %}
{% if invalid_page %}
This page does not exists (anymore).
{% endif %}
... display object list ...
{% paginate %}
Also the paginator fails if somebody uses strings as a page number. In this
case the default page number should be "1".
Original issue reported on code.google.com by [email protected]
on 4 Jul 2008 at 10:19
Attachments:
The attachment contains the Spanish translation for django-pagination.
Original issue reported on code.google.com by [email protected]
on 18 Feb 2009 at 6:16
Attachments:
What steps will reproduce the problem?
1. Install django-pagination as documented
2. Navigate to an invalid page number
What is the expected output? What do you see instead?
If django-pagination is installed according to the documentation, you will
see a 500 error (TemplateSyntaxError). What you should see instead is,
perhaps, arguable.
In issue 1 the fix chosen was to set an (undocumented) context variable
"invalid_page". If this is the preferred route, the use of that context
variable needs to be clearly documented in the usage docs, as the standard
setup of django-pagination should not open up a site to 500 errors.
In my opinion, the fix for issue 1 was insufficient, as it's ugly to always
have to include invalid_page-checking boilerplate in any template that uses
django-pagination. I would prefer to see an invalid page simply return the
first page instead.
Some options I see:
1. Invalid page returns first page. Very easy to use, idiot-proof.
Backwards-incompatible
2. Keep current behavior, but add documentation of invalid_page context
variable. Makes templates using pagination uglier and more complex than
they need to be if you want to avoid 500s.
3. Introduce a setting to choose between 1 and 2.
What version of the product are you using? On what operating system?
Most recent SVN trunk, with Django 1.0.x branch.
Please provide any additional information below.
I'm happy to write a patch for any of the above solutions, once one of them
is chosen.
Original issue reported on code.google.com by carl.j.meyer
on 6 Nov 2008 at 4:27
in pagination_tags.py:
to_return['getvars'] = "&%s" % getvars.urlencode()
should be:
to_return['getvars'] = "&%s" % getvars.urlencode()
Original issue reported on code.google.com by [email protected]
on 25 May 2009 at 9:41
What steps will reproduce the problem?
1. Use Django after revision 8202
What is the expected output? What do you see instead?
File "E:\Software\workspace\django-pagination\pagination\middleware.py",
line 8, in process_request
request.page = int(request['page'])
TypeError: 'WSGIRequest' object is unsubscriptable
What version of the product are you using? On what operating system?
django-pagination r23
Please provide any additional information below.
Since [8202], to access data in GET or POST, you need to do
request.REQUEST['myvar'] instead of request['myvar']
http://code.djangoproject.com/changeset/8202
Patch attached.
Original issue reported on code.google.com by [email protected]
on 4 Aug 2008 at 12:16
Attachments:
In order for the ``render'' method to be called on AutoPaginateNode, the
``{% autopaginate object_list %}'' tag must be placed in a section of a
template that is rendered. A common case where a tag might be placed in a
non-rendered area is if you are using template inheritance. For example,
the following does not work:
{{{
{% extends "base.html %}
{% load pagination_tags
{% autopaginate object_list %}
{% block body %}
{% for object in object_list %}
...
{% endfor %}
{% endblock %}
}}}
Instead, the autopaginate tag must be moved inside the "body" block to
work. Since the autopaginate tag doesn't output anything (it simply
changes the context), this restriction isn't automatically intuitive.
Simply clarifying this in the documentation should be sufficient, if there
isn't a good way to make the tag function without "render" getting called.
Original issue reported on code.google.com by [email protected]
on 27 Mar 2009 at 10:30
I use object_list view with dict like:
posts_dict={
'queryset': Post.objects.all(),
'template_name': 'galgather/posts_archive.html',
'allow_empty':True,
'template_object_name':'posts',
}
In my template I use:
{% autopaginate posts_list 20 %}
{% pagination %}
Request for every page triggers query which fetches all instances of my
post model every time instead of expected 20 of them - in SQL there's no
LIMIT and OFFSET statements.
While I was testing django builtin Pagination object as described at
http://docs.djangoproject.com/en/dev/topics/pagination/#topics-pagination
it works well - queries include LIMIT and OFFSET
I use:
postgresql-8.3.5
django-1.0.2
django-pagination revision 46
Some more detailed information about my model is at
http://groups.google.com/group/django-users/browse_thread/
thread/8245495741aa34e5#
Original issue reported on code.google.com by [email protected]
on 5 Feb 2009 at 7:49
would be nice if we could do:
autopaginate object_list number_of_items
where number_of_items can be a variable defined in the context or a number.
Should I create a patch and submit?
Original issue reported on code.google.com by [email protected]
on 16 Jul 2008 at 1:13
What steps will reproduce the problem?
1. On Django connected to MSSQL 2005 put for more than 101 rows to result.
2. It returns "Cannot create new connection because in manual or
distributed transaction mode"
3. Add "MultipleActiveResultSets=true" to connection string and still
return "Cannot create new connection because in manual or distributed
transaction mode"
What version of the product are you using? On what operating system?
Win 2003 server
MSSQL 2005
django-pagination-1.0.4
Python 2.6.1 and Python 2.5.2 (same result)
Django 1.0.2
Newest version of sqlserver_ado
Brano
Original issue reported on code.google.com by [email protected]
on 10 Jan 2009 at 4:59
The "How to use django-pagination" doc, linked from the wiki, should
mention the need to add 'django.core.context_processors.request' to the
TEMPLATE_CONTEXT_PROCESSORS setting, commented out by default in
django.settings.global_settings.py .
Original issue reported on code.google.com by [email protected]
on 5 Sep 2008 at 9:13
It would be great if there's any way to change the format of the URL.
Maybe some people would prefer /foo/bar/page/42/ to /foo/bar/?page=42.
Original issue reported on code.google.com by [email protected]
on 14 Jul 2008 at 8:01
What steps will reproduce the problem?
1. Follow steps in the README
2. Render a paginated list on a page which doesn't include the request
object in the context (which is the default case on the Django trunk)
3. Receive a KeyError on line 73 of pagination_tags.py
What version of the product are you using? On what operating system?
I'm on OS X using the Django trunk and the django-pagination trunk. I can
resolve the problem by including the request object in the context I'm
passing the renderer from my view, like so:
render_to_response('news/index.html', {'request': request, 'stories':
recent_stories})
Please provide any additional information below.
Thanks for providing this code! Even with the hiccups it's great!
Original issue reported on code.google.com by [email protected]
on 17 Jul 2008 at 4:28
What steps will reproduce the problem?
1. install pagitation as doc describes
2. add the needed code to template
3. test the page
What is the expected output? What do you see instead?
i see the error:
Request Method: GET
Request URL: http://localhost:8000/cyradm/
Exception Type: TemplateSyntaxError
Exception Value: 'pagination_tags' is not a valid tag library: Could not
load template library from django.templatetags.pagination_tags, cannot
import name Paginator
Exception Location:
/usr/lib/python2.4/site-packages/django/template/defaulttags.py in load,
line 750
What version of the product are you using? On what operating system?
linux , python 2.4 , code from svn
Original issue reported on code.google.com by [email protected]
on 6 Aug 2008 at 6:22
How to transfer parameters and values to pagination.html?
Can provide a example?
Original issue reported on code.google.com by [email protected]
on 26 Sep 2008 at 11:31
What steps will reproduce the problem?
1. Installed GAE
2. Installed appengine_django
3. Copied the pagination folder into my project folder
What is the expected output? What do you see instead?
Exception Value: 'pagination_tags' is not a valid tag library: Could not
load template library from django.templatetags.pagination_tags, cannot
import name Paginator
Exception Location: C:\Program
Files\Google\google_appengine\lib\django\django\template\defaulttags.py in
load, line 750
What version of the product are you using? On what operating system?
Pagination 1.0.4
Please provide any additional information below.
Should this even work with GAE?
Original issue reported on code.google.com by [email protected]
on 11 Nov 2008 at 8:42
What steps will reproduce the problem?
1. Add the tag {% paginate %} after the loop
What is the expected output? What do you see instead?
Expected to output the number of available pages.
I´ve got an TemplateSyntaxError
What version of the product are you using? On what operating system?
The last one.
Windows + Python 2.6 + Django 1.1
Please provide any additional information below.
The pagination worked well after put the tag {% paginate %} in the template.
Thanks.
Original issue reported on code.google.com by [email protected]
on 19 Jun 2009 at 8:32
Attachments:
SVN version of this library does not install i18n catalogs and templates -
directories locale and
templates are missing from installed package.
Original issue reported on code.google.com by [email protected]
on 12 Apr 2009 at 9:17
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.