无法激活 django 管理屏幕
错误页面显示如下: 回溯(最近一次调用最后一次):
文件“/Library/Python/2.6/site-packages/django/core/servers/basehttp.py”,第 283 行,运行中 self.result = application(self.environ, self.start_response)
文件“/Library/Python/2.6/site-packages/django/core/handlers/wsgi.py”,第 273 行,调用 响应 = self.get_response(request)
文件“/Library/Python/2.6/site-packages/django/core/handlers/base.py”,第 153 行,在 get_response 中 响应= self.handle_uncaught_exception(请求,解析器,sys.exc_info())
文件“/Library/Python/2.6/site-packages/django/core/handlers/base.py”,第218行,在handle_uncaught_exception中 返回回调(请求,**param_dict)
文件“/Library/Python/2.6/site-packages/django/utils/decorators.py”,第93行,在_wrapped_view中 响应 = view_func(request, *args, **kwargs)
文件“/Library/Python/2.6/site-packages/django/views/defaults.py”,第 30 行,在 server_error 中 t = loader.get_template(template_name) # 您需要创建一个 500.html 模板。
文件“/Library/Python/2.6/site-packages/django/template/loader.py”,第 157 行,在 get_template 中 template, origin = find_template(template_name)
文件“/Library/Python/2.6/site-packages/django/template/loader.py”,第 138 行,在 find_template 中 引发 TemplateDoesNotExist(名称)
TemplateDoesNotExist: 500.html
Error page shows the following:
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/django/core/servers/basehttp.py", line 283, in run
self.result = application(self.environ, self.start_response)
File "/Library/Python/2.6/site-packages/django/core/handlers/wsgi.py", line 273, in call
response = self.get_response(request)
File "/Library/Python/2.6/site-packages/django/core/handlers/base.py", line 153, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "/Library/Python/2.6/site-packages/django/core/handlers/base.py", line 218, in handle_uncaught_exception
return callback(request, **param_dict)
File "/Library/Python/2.6/site-packages/django/utils/decorators.py", line 93, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/Library/Python/2.6/site-packages/django/views/defaults.py", line 30, in server_error
t = loader.get_template(template_name) # You need to create a 500.html template.
File "/Library/Python/2.6/site-packages/django/template/loader.py", line 157, in get_template
template, origin = find_template(template_name)
File "/Library/Python/2.6/site-packages/django/template/loader.py", line 138, in find_template
raise TemplateDoesNotExist(name)
TemplateDoesNotExist: 500.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查 settings.py 中的 Template_Loaders。它应该看起来像这样自动查找默认管理模板。 app_directories.Loader 在这里很重要。
Check your Template_Loaders in settings.py. It should look like this to automatically find the default admin templates. The app_directories.Loader is important here.