Python 带有Docker错误的Django';SessionStore';对象没有属性'_会话缓存&x27;

Python 带有Docker错误的Django';SessionStore';对象没有属性'_会话缓存&x27;,python,django,docker,Python,Django,Docker,我有一个使用Django身份验证的应用程序。当我在本地与classic一起使用时 python manage.py runserver 一切正常,但当我试图从docker运行它时,我得到一个打字错误 异常值:参数1必须是str,而不是PosixPath 这是从我的模板中的这段代码触发的 {%if user.u经过身份验证%} 然后我得到了这个错误, 在处理上述异常(“SessionStore”对象没有属性“\u session\u cache”)的过程中,发生了另一个异常: my view.py

我有一个使用Django身份验证的应用程序。当我在本地与classic一起使用时
python manage.py runserver
一切正常,但当我试图从docker运行它时,我得到一个打字错误
异常值:参数1必须是str,而不是PosixPath
这是从我的模板中的这段代码触发的
{%if user.u经过身份验证%}

然后我得到了这个错误,
在处理上述异常(“SessionStore”对象没有属性“\u session\u cache”)的过程中,发生了另一个异常:

my view.py文件

# Create your views here.     
def target_first_page(request):
    return render(request, "target/target_main.html")

@login_required
def target_survey(request):
    return render(request, "target/target_survey.html")

@login_required
def target_survey_result(request):
    return render(request, "target/target_survey_result.html")

知道这里发生了什么吗?

你能分享你的视图文件吗?谢谢你能分享你的视图文件吗?非常感谢。