On 23 Nov 2005, at 15:07, Simon Willison wrote:
The aim with the template system has always been to keep it de-
coupled from the request/response stuff, so it can be used as a
standalone component. It's hard to see how the request object could
be exposed to custom tags without breaking tha
On 23 Nov 2005, at 14:59, Afternoon wrote:
Is there a way that the request object could be exposed to custom
tag code, but not the template itself?
The aim with the template system has always been to keep it de-
coupled from the request/response stuff, so it can be used as a
standalone c
On 23 Nov 2005, at 14:42, Colin Howlett wrote:
+1 to putting the request object into the context as standard, or at
least into DjangoContext. I've only been playing with Django for a few
days, and it's already obvious that this single change would make
writing useful custom tags a whole lot ea
+1 to putting the request object into the context as standard, or at
least into DjangoContext. I've only been playing with Django for a few
days, and it's already obvious that this single change would make
writing useful custom tags a whole lot easier.
Colin
On Tue, 22 Nov 2005 07:09:06 -0800 [EMAIL PROTECTED] wrote:
> What is the Django Way (tm) to paginate complex queries with
> user-controlled parameters? That is, if I want to paginate the
> results of a foos.get_list({'lots': 'of_complex', ['junk': 'in
> here']}) where the query terms are submi
On 11/22/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> What is the Django Way (tm) to paginate complex queries with
> user-controlled parameters? That is, if I want to paginate the results
> of a foos.get_list({'lots': 'of_complex', ['junk': 'in here']}) where
> the query terms are submitt
I've already dug into the paginator code. I was hoping there was a way
to do it without having to munge query parameters by hand every time I
get a new page. I thought my solution was bad but that code in the
admin interface is pretty much the same sort of edge-case-ridden sin
against nature.
M
Use the (undocumented) django.core.paginator class:
http://code.djangoproject.com/browser/django/trunk/django/core/paginator.py
You can see an example on how it works in:
http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/views/main.py
in the change_list function, the one t
What is the Django Way (tm) to paginate complex queries with
user-controlled parameters? That is, if I want to paginate the results
of a foos.get_list({'lots': 'of_complex', ['junk': 'in here']}) where
the query terms are submitted via form, how should I go about that
while maintaining the user-p
9 matches
Mail list logo