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 850401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:15:37+00:00 2026-05-15T07:15:37+00:00

I’m following this tutorial on a Windows 7 environment. My settings file has this

  • 0

I’m following this tutorial on a Windows 7 environment.

My settings file has this definition:

TEMPLATE_DIRS = (
    'C:/django-project/myapp/mytemplates/admin'
)

I got the base_template from the template admin/base_site.html from within the default Django admin template directory in the source code of Django itself (django/contrib/admin/templates) into an admin subdirectory of myapp directory as the tutorial instructed, but it doesn’t seem to take affect for some reason.

Any clue of what might be the problem?

  • 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-15T07:15:38+00:00Added an answer on May 15, 2026 at 7:15 am

    I know this isn’t in the Django tutorial, and shame on them, but it’s better to set up relative paths for your path variables. You can set it up like so:

    import os.path
    
    PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))
    
    ...
    
    MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media/')
    
    TEMPLATE_DIRS = [
        os.path.join(PROJECT_PATH, 'templates/'),
    ]
    

    This way you can move your Django project and your path roots will update automatically. This is useful when you’re setting up your production server.

    Second, there’s something suspect to your TEMPLATE_DIRS path. It should point to the root of your template directory. Also, it should also end in a trailing /.

    I’m just going to guess here that the .../admin/ directory is not your template root. If you still want to write absolute paths you should take out the reference to the admin template directory.

    TEMPLATE_DIRS = [
        'C:/django-project/myapp/mytemplates/',
    ]
    

    With that being said, the template loaders by default should be set up to recursively traverse into your app directories to locate template files.

    TEMPLATE_LOADERS = [
        'django.template.loaders.filesystem.load_template_source',
        'django.template.loaders.app_directories.load_template_source',
        # 'django.template.loaders.eggs.load_template_source',
    ]
    

    You shouldn’t need to copy over the admin templates unless if you specifically want to overwrite something.

    You will have to run a syncdb if you haven’t run it yet. You’ll also need to statically server your media files if you’re hosting django through runserver.

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

Sidebar

Related Questions

No related questions found

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.