<form action="/search" method="GET" id="passparms">
First I use this way to pass the params,then push it into function
url(r'^search$', search.mysearch)
and now my function like this:
def search(request):
request.encoding = 'utf-8'
product, suggestion = searchbykw(request)
paginator = Paginator(product, 21)
page = request.GET.get('page')
try:
product = paginator.page(page)
except PageNotAnInteger:
product = paginator.page(1)
except EmptyPage:
product = paginator.page(paginator.num_pages)
return render(request, "shop.html",'suggestion': suggestion[0] if suggestion else '',})
right now my url is like
http://127.0.0.1:3453/search?brand=&category=
when I use Python Pagination, the url becomes
http://127.0.0.1:3453/search?page=2
Read a lot on Python Pagination, still no clue. Please help me and thank you for your help.