Re: Question about QuerySet and Pagination

2011-09-29 Thread Felix Wagner
Thank you very much for your help On Sep 29, 4:25 pm, Tom Evans wrote: > On Thu, Sep 29, 2011 at 3:16 PM, Felix Wagner > wrote: > > Ok, so now i have: > > .. > >             > ... > > Now if i click next page I get an empty page because: > >http://127.0.0.1:8000/search/?page=2, > > > I probably

Re: Question about QuerySet and Pagination

2011-09-29 Thread Tom Evans
On Thu, Sep 29, 2011 at 3:16 PM, Felix Wagner wrote: > Ok, so now i have: > .. >             ... > Now if i click next page I get an empty page because: > http://127.0.0.1:8000/search/?page=2, > > I probably need a url entry and do i have to give the poaginator the > query or do I have to save the

Re: Question about QuerySet and Pagination

2011-09-29 Thread Felix Wagner
Ok, so now i have: template: {% block coltype %}colMS{% endblock %} {% block content %} Suche Search: {% if query %} Resultate für "{{ query|escape }}": {% if results %} The

Re: Question about QuerySet and Pagination

2011-09-29 Thread Tom Evans
On Thu, Sep 29, 2011 at 8:36 AM, Felix Wagner wrote: > Hello, > > I'm currently trying to paginate my results from a search query. > > views.py: > > def search(request): >    query = request.GET.get('q', '') > >    if query: >        qset = ( >            Q(NAME__icontains=query) >        ) >    

Question about QuerySet and Pagination

2011-09-29 Thread Felix Wagner
Hello, I'm currently trying to paginate my results from a search query. views.py: def search(request): query = request.GET.get('q', '') if query: qset = ( Q(NAME__icontains=query) ) results = Thin_Client.objects.filter(qset).distinct() else: