Last modified: Jan 10, 2023 By Alexander Williams
I wanted to add pagination to django search results
Hassan
Hello,
In my website, I wanted to add pagination to search results. But when I went to the URL
/?search=first+post/?page=2.
The page parameter is added to the search query.
Pls how can I fix that? Thanks
(02 Comments)
Aaron
1
We have no idea what your backend looks like as you haven’t posted any code related to pagination.
So this link will have to suffice:
How to Paginate with Django
Hassan
1The url is malformed (invalid): /?search=blah/?page=2 It should be something like: /?search=blah&page=2 Read up on HTTP URL Query String, it has a specific format, and this is what you get in request.GET on the Django side.