📜  重定向发布请求 django - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:47.796000             🧑  作者: Mango

代码示例1
def redirected_view(request):
    # Some processing if needed
    ...
    # save post data to session & redirect
    request.session['_post_data'] = request.POST
    return HttpResponseRedirect('redirect_to_view')

def redirect_to_view(request):
    old_post = request.session.get('_post_data')
    # Use saved _post_data & delete it