Redirecting after AJAX post in Django

前端 未结 3 1683
灰色年华
灰色年华 2020-12-08 02:51

I use Django\'s built-in DeleteView and I\'ve assigned a value to the success_url attribute. Now in my template, I trigger this view via JQuery\' $.post() metho

3条回答
  •  死守一世寂寞
    2020-12-08 03:45

    django-ajax's ajaxPost allows for redirects if you pass a normal redirect(URL) to it (as a json response). Jquery ajax() methods did not work in my case.

提交回复
热议问题