模板不存在

Bis*_*rai 8 django

我是Django的新手.我使用pydev eclipse作为IDE.首先,我创建了一个项目,然后在该项目上欢迎应用程序.我在项目中创建了一个名为Templates的文件夹,并创建一个文件"home.html",home.html包含

<div>
This is my first site
</div> 
Run Code Online (Sandbox Code Playgroud)

我将settings.py文件修改为

TEMPLATE_DIRS = ("Templates")

INSTALLED_APPS = (
    ..........#all default items
    'welcome', #the added one
)
Run Code Online (Sandbox Code Playgroud)

views.py包括

from django.shortcuts import render_to_response
def home(request):
    return render_to_response('home.html')
Run Code Online (Sandbox Code Playgroud)

urls.py包含

from django.conf.urls import patterns, include, url
from welcome.views import home
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'MajorProject.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),
    url(r'^home/$', home),

)
Run Code Online (Sandbox Code Playgroud)

然后我将它作为django项目运行并打开我的浏览器并在localhost:8000/home上看到它显示错误

TemplateDoesNotExist at /home/
home.html
Request Method: GET
Request URL:    http://localhost:8000/home/
Django Version: 1.6
Exception Type: TemplateDoesNotExist
Exception Value:    
home.html
Exception Location: C:\Python27\django\template\loader.py in find_template, line 131
Python Executable:  C:\Python27\python.exe
Python Version: 2.7.2
Python Path:    
['D:\\Bishnu\\BE\\4th year\\8th semester\\Major Project II\\Working\\Workspace\\MajorProject',
 'C:\\Python27\\lib\\site-packages\\distribute-0.6.35-py2.7.egg',
 'D:\\Bishnu\\BE\\4th year\\8th semester\\Major Project II\\Working\\Workspace\\MajorProject',
 'C:\\Python27\\DLLs',
 'C:\\Python27\\lib',
 'C:\\Python27\\lib\\plat-win',
 'C:\\Python27\\lib\\lib-tk',
 'C:\\Python27',
 'C:\\Python27\\lib\\site-packages',
 'C:\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode',
 'C:\\Windows\\SYSTEM32\\python27.zip']
Server time:    Sun, 2 Jun 2013 14:25:52 +0545
Run Code Online (Sandbox Code Playgroud)

nKa*_*del 6

尝试在 上设置模板目录setting.py
作为

TEMPLATE_DIRS = (
                    os.path.join(os.path.dirname(__file__),'templates'),
)
Run Code Online (Sandbox Code Playgroud)