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

  • SEARCH
  • Home
  • 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 6226393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:01:25+00:00 2026-05-24T09:01:25+00:00

Running through the djangobook (ver 2). I had a little trouble with template loading;

  • 0

Running through the djangobook (ver 2). I had a little trouble with template loading; my relevant filestructure:

testSite/urls.py

testSite/books/views.py  
testSite/books/templates/

testSite/contact/views.py  
testSite/contact/templates/

When I set-up a view for the books chapter (chap. 5), I was able to create a url in urls.py, point it to a view function in testSite/books/views, but when I called the template from that view function, I did not have to specify a directory – django knew it was in testSite/books/templates.

I tried doing the same thing for the contact form chapter (chap. 7), but this time it would not load the template – I had to go back to settings.py and explicitly place testSite/contact/templates into TEMPLATE_DIRS:

# testSite/settings.py
# ....
TEMPLATE_DIRS = (
    '/home/chris/djcode/testSite/templates',
    '/home/chris/djcode/testSite/contact/templates',
)

So – is there an obvious explanation as to why I need to point django to the contact/templates folder, but not the books/templates folder?

(If not, I can post more code – trying to keep it short)

  • 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-24T09:01:26+00:00Added an answer on May 24, 2026 at 9:01 am

    You either did not add the contact application to your INSTALLED_APPS in settings.py OR you are trying to load the template from one application inside another application. The TEMPLATE_DIRS is where to look if it doesn’t find the template inside the same application as the views are loading from.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While running through the cheat sheet create a navigation rule for the Eclipse JavaServer
when running through a result set, how efficient is this approach as compared to
I'm running through an XML document, selecting all the elements, and creating links based
I'm running through my web app and I'm trying to test various parts of
I'm running through this tutorial found here: http://vb.net-informations.com/crystal-report/vb.net_crystal_report_from_multiple_tables.htm which teaches how to pass a
I'm running through some memory profiling for my application in SDK 3.2 and I
So I'm running through a list of things and have code that creates an
I am running through a tutorial online at http://www.sthurlow.com/python/lesson08/ and I believe I understand
I've been running through the ASP.Net MVC C# Movie Database tutorial, but been trying
I've been running through many of the text to speech examples available for Android

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.