I use the code from the documentation to paginate the data:
try:
data = paginator.page(request.GET.get(\'page\'))
except PageNotAnInteger:
page = 1
The easy way would be to include those variables in your template:
next
Just add var1
and var2
to your context
.
That's if the query string variables are originated from your backend. If they're coming from the front-end/external, you could use something like How can I get query string values in JavaScript? in your template and either edit the template vars directly or pass the values to your backend.