Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for 'as' in template tag #4

Open
glezos opened this issue Aug 18, 2009 · 1 comment
Open

Support for 'as' in template tag #4

glezos opened this issue Aug 18, 2009 · 1 comment

Comments

@glezos
Copy link

glezos commented Aug 18, 2009

django-pagination supports the 'as' keyword in the template tag:

{% autopaginate f.qs 40 as filter_list %}

This allows us to use it with django-filter too, as noted here: http://github.com/alex/django-filter/issues#issue/13.

To combing django-sorting with pagination, if I understand correctly, we'll need to do this:

{% autosort f.qs as actionlog %}
{% autopaginate actionlog 30 %}

Currently I'm doing this through the view, passing an extra argument to the template, but it'd be nice if we could provide this backwards-compatible fix.

@lukeman
Copy link

lukeman commented Apr 9, 2010

I started implementing this and realized that someone else already has a patch downstream (it looks to have been submitted to jezdez's fork).

http://github.com/jezdez/django-sorting/commit/9a67c3668c4235e4e542cc02a786c06168415f19

It's working well for me, but there is an additional bug that keeps django-filter from working properly. I am writing that up currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants