- 论坛徽章:
- 0
|
我的TEMPLATE_DIRS 是C:/py/templates
然后在views里用loader.get_template('polls/index')
我的模板目录下有polls/index.html.
但是一直报错
Traceback (most recent call last):
File "c:\python24\lib\site-packages\django-0.90-py2.4.egg\django\core\servers\basehttp.py", line 272, in run
self.result = application(self.environ, self.start_response)
File "c:\python24\lib\site-packages\django-0.90-py2.4.egg\django\core\servers\basehttp.py", line 615, in __call__
return self.application(environ, start_response)
File "c:\python24\lib\site-packages\django-0.90-py2.4.egg\django\core\handlers\wsgi.py", line 154, in __call__
response = self.get_response(request.path, request)
File "c:\python24\lib\site-packages\django-0.90-py2.4.egg\django\core\handlers\base.py", line 115, in get_response
return self.get_friendly_error_response(request, resolver)
File "c:\python24\lib\site-packages\django-0.90-py2.4.egg\django\core\handlers\base.py", line 124, in get_friendly_error_response
return callback(request, **param_dict)
File "c:\python24\lib\site-packages\django-0.90-py2.4.egg\django\views\defaults.py", line 68, in server_error
t = loader.get_template('500')
File "c:\python24\lib\site-packages\django-0.90-py2.4.egg\django\core\template\loader.py", line 57, in get_template
return get_template_from_string(load_template_source(template_name))
File "c:\python24\lib\site-packages\django-0.90-py2.4.egg\django\core\template\loader.py", line 47, in load_template_source
raise TemplateDoesNotExist, name
TemplateDoesNotExist: 500
有人解决不? |
|