How do I pass template context information when using HttpResponseRedirect in Django?

前端 未结 7 1823
我在风中等你
我在风中等你 2020-12-05 04:26

I have a form that redirects to the same page after a user enters information (so that they can continue entering information). If the form submission is successful, I\'m r

7条回答
  •  甜味超标
    2020-12-05 05:06

    The best way would probably be to use a coded querystring on the redirect URL... its an old school approach.

    You could do something like

    /page/?m=1, /page/?m=2, etc

    You would then parse that variable with request.GET in the view code and show the appropriate message.

提交回复
热议问题