Django中的TypeError: __init__() missing 1 required positional argument: ‘app_module‘错误解决办法
`Django`中的`TypeError: __init__() missing 1 required positional argument: 'app_module'`错误解决办法
·
Django
中的TypeError: __init__() missing 1 required positional argument: 'app_module'
错误
是因为不小心在settings.py
中TEMPLATES
加了app
注册, 将其注释掉即可
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
# 'users.apps.UsersConfig'
]
更多推荐
已为社区贡献4条内容
所有评论(0)