Note that there are some explanatory texts on larger screens.

plurals
  1. POTemplate Does not exist
    primarykey
    data
    text
    <p>I am new to Django. I use pydev eclipse as an IDE. First I created a project then an application welcome on that project. I made a folder named Templates within the project and make a file "home.html" and home.html contains</p> <pre><code>&lt;div&gt; This is my first site &lt;/div&gt; </code></pre> <p>I modify the settings.py file as</p> <pre><code>TEMPLATE_DIRS = ("Templates") INSTALLED_APPS = ( ..........#all default items 'welcome', #the added one ) </code></pre> <p>views.py includes</p> <pre><code>from django.shortcuts import render_to_response def home(request): return render_to_response('home.html') </code></pre> <p>urls.py contains</p> <pre><code>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), ) </code></pre> <p>then I run it as django project and open my browser and see on localhost:8000/home it shows error </p> <pre><code>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 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload