Django模板的问题??

Django模板的问题??

我的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

有人解决不?
在settings中将模板目录加进去了吗?
TEMPLATE_DIRS = (
    "C:/py/templates/polls", # template
)
TEMPLATE_DIRS = (
    "C:/py/templates/polls", # template
)

改为:

TEMPLATE_DIRS = (
    "C:/py/templates", # template
)

试试
还是一样哦.还是找不到模板的.挺郁闷的.
再按例子重做一遍。
现在好了.不知道什么原因.第一次的时候建数据库也是莫名其妙的问题/
谢谢limodou的意见
呵呵。不知道。