success_url in UpdateView, based on passed value

后端 未结 5 1088
我在风中等你
我在风中等你 2020-12-23 20:52

How can I set success_url based on a parameter?
I really want to go back to where I came from, not some static place. In pseudo code:

url(r         


        
5条回答
  •  一生所求
    2020-12-23 21:11

    Why don't you add a 'next' parameter to your form (template) and catch it in your view. It's common practice to achieve redirecting this way.

提交回复
热议问题