What is the best way to redirect on the server after an ajax request in django. Say I have this view function that receives an ajax call
def view(request):
if request.is_ajax():
do_something() # This function does something on the server
return redirect('') # Redirect back to the same view's get
It seems like the server redirects but on the client side the browser is not refreshed because the post method was through Ajax. I have some ideas in mind but they may not be so optimal. Is there an optimal way to go about this?
Thanks.