how to redirect with parameters in django code example
Example 1: redirect django
from django.shortcuts import redirect
def my_view(request):
# ...
return redirect('some-view-name', foo='bar')
Example 2: how to redirect to previous page in django
<form method="POST">
{% csrf_token %}
{{ form }}
<input type="hidden" name="next" value="{{ request.path }}">
<button type="submit">Let's Go</button>
</form>