📜  如何在视图之间传递数据 django - Python 代码示例

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

代码示例1
def update_project_filter(request):
    ...
    selected_project_id = project_form.cleaned_data["Project_Name"].id
    request.session['selected_project_id'] = selected_project_id
    ...

def update_project(request):
    ...
    selected_project_id = request.session.get('selected_project_id')
    ...