gpt4 book ai didi

Django-mptt 错误。找不到 admin/mptt_change_list.html 模板

转载 作者:行者123 更新时间:2023-12-01 14:37:39 26 4
gpt4 key购买 nike

我遇到了与此主题类似的问题 Django-MPTT, how to

我已将“mptt”添加到 INSTALLED_APPS

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'app',
'south',
'mptt',
)

但是钢铁我有这个错误

TemplateDoesNotExist at /admin/app/category/
admin/mptt_change_list.html
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/app/category/
Django Version: 1.6.5
Exception Type: TemplateDoesNotExist
Exception Value:
admin/mptt_change_list.html
Exception Location: /usr/local/lib/python2.7/dist-packages/django/template/loader.py in find_template, line 131
Python Executable: /usr/bin/python
Python Version: 2.7.6

似乎模板不在它的路径上,但 mptt 已正确安装并且在 PYTHONPATH 上

Template-loader postmortem

Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
Using loader django.template.loaders.app_directories.Loader:
/usr/local/lib/python2.7/dist-packages/django/contrib/admin/templates/admin/mptt_change_list.html (File does not exist)
/usr/local/lib/python2.7/dist-packages/django/contrib/auth/templates/admin/mptt_change_list.html (File does not exist)
/home/islam/DM/repo/dm/DM-165/app/templates/admin/mptt_change_list.html (File does not exist)
/usr/local/lib/python2.7/dist-packages/debug_toolbar/templates/admin/mptt_change_list.html (File does not exist)

最佳答案

解决方案是使用 sudo pip uninstall django-mptt 删除 mptt并使用 pip 再次安装:sudo pip install django-mptt --upgrade

关于Django-mptt 错误。找不到 admin/mptt_change_list.html 模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24935521/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com