Hi to all.

I've add a generic list view with:
    # Picture list:
    (r'^museo/galleria/(?P<page>[0-9]+)/$',
'django.views.generic.list_detail.object_list',
dict(picture_list_info)),

and I want to add previous and next links.

It seems I must write an absolute url, in template, with:
{% if has_previous %}<a
href="http://localhost:8000/museo/galleria/{{previous}}";>Pagina
Precedente</a>{% endif %}
{% if has_next %}<a
href="http://localhost:8000/museo/galleria/{{next}}";>Pagina
Successiva</a>{% endif %}


Now I want to paginate the results of a search. The search use the
request.POST to filter results:

if request.POST['title'] != '':
          query = query.filter(title__icontains=request.POST['title'])

and then:
return object_list(request, queryset=query)

how can I show the second page of my search results?

I've searched a lot on documentation, without results...


-- 
Alessandro Ronchi
Skype: aronchi - Wengo: aleronchi
http://www.alessandroronchi.net - Il mio sito personale
http://www.soasi.com - Sviluppo Software e Sistemi Open Source

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to