Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7041351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:01:58+00:00 2026-05-28T02:01:58+00:00

For some reason the webapp I created, cannot find the template. I tried also

  • 0

For some reason the webapp I created, cannot find the template. I tried also to place the html file into several different location, but it still won’t find it. As of now I have placed my template director at the following location C:\xampp\htdocs\django_proj\templates\. Do someone else know what the problem could be.

I have another webapp in this django project. The model and view, look almost the same, however that webapp can find the templates.

/webapp/models.py

from django.db import models

class Profile(models.Model):
    name = models.CharField(max_length=255)
    age = models.IntegerField() 
    added_at = models.DateTimeField(auto_now_add=True)

/webapp/views.py

from django.views.generic.list_detail import object_list

from models import Profile

def profile_list(request):
    return object_list(request,
        queryset=Profile.objects.all(),
        template_name='/webapp/list.html',
        template_object_name='profiles')

/webapp/urls.py

from django.conf.urls.defaults import *

import views

urlpatterns = patterns('',

    url(r'^list/$', views.profile_list, name='profile_list'),
)

/urls.py

from django.conf.urls import *

    urlpatterns = patterns('',

         (r'^webapp/', include('webapp.urls')),
    )

/templates/webapp/list.html

<html>
  <body>
  Test
  </body>
</html>

Error message

TemplateDoesNotExist at /webapp/list/

/webapp/list.html

Request Method:     GET
Request URL:    http://localhost:8000/webapp/list/
Django Version:     1.4 pre-alpha
Exception Type:     TemplateDoesNotExist
Exception Value:    

/webapp/list.html

Exception Location:     c:\tools\python27\lib\site-packages\django\template\loader.py in find_template, line 138
Python Executable:  c:\tools\python27\python.exe
Python Version:     2.7.2
Python Path:    

['C:\\xampp\\htdocs\\webnotes',
 'c:\\tools\\python27\\lib\\site-packages\\pip-1.0.2-py2.7.egg',
 'C:\\Windows\\system32\\python27.zip',
 'c:\\tools\\python27\\DLLs',
 'c:\\tools\\python27\\lib',
 'c:\\tools\\python27\\lib\\plat-win',
 'c:\\tools\\python27\\lib\\lib-tk',
 'c:\\tools\\python27',
 'c:\\tools\\python27\\lib\\site-packages']

Server time:    Thu, 12 Jan 2012 19:33:48 +0100
Template-loader postmortem

Django tried loading these templates, in this order:

    Using loader django.template.loaders.filesystem.Loader:
    Using loader django.template.loaders.app_directories.Loader: 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:01:59+00:00Added an answer on May 28, 2026 at 2:01 am

    Your template name contains the aboslute path /webapp/list.html. Try making it a relative path webapp/list.html so that os.path.join(.) handles path concatenation as intended.

    Try this:

    def profile_list(request):
        return object_list(request,
            queryset=Profile.objects.all(),
            template_name='webapp/list.html', # removed slash here.
            template_object_name='profiles')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason I can't find this through searches, not really sure what keywords
I'm new to Lift framework for scala. For some reason, index.html resides in the
I'm trying to deploy a JRuby on Rails war into Tomcat6. For some reason,
For some reason every 3-5 days our web app loses the ability to open
For some reason I never see this done. Is there a reason why not?
For some reason when I attempt to make a request to an Ajax.net web
For some reason when I create a new namespace in Visual Studio 2008 its
For some reason, when I try to install SQL Server 2008 Express , I
For some reason, lately the *.UDL files on many of my client systems are
For some reason, Section 1 works but Section 2 does not. When run in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.