[英]Is there a way I can pass the context using return redirect in Django?
我想使用return redirect
傳遞上下文,因為使用return render
會在刷新頁面時再次發送帖子。
這是我的返回渲染代碼:
context = {
'file_path': file_path+'reviews_processed.csv',
'file_name': 'reviews_processed.csv',
}
messages.add_message(request, messages.SUCCESS, 'Processing done!')
return render(request, 'vlookup/vlookup.html', context)
這就是我想要實現的目標:
# return redirect(vlookup, context)
謝謝!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.