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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:47:58+00:00 2026-05-11T19:47:58+00:00

The Django documentation states the following clearly: Not every template in contrib\admin\templates\admin may be

  • 0

The Django documentation states the following clearly:

Not every template in contrib\admin\templates\admin may be overridden per app or per model.

It then lists the ones that can, and base.html, base_site.html and index.html – the ones I’m interested in – are not among those listed. They can be overridden per-project, but not per-app.

My question is: is there a way around this that doesn’t involve editing the code inside django.contrib.admin? I’m willing to consider some monkeypatching solutions :-). I really want my app to have custom versions of those three files inside its templates directory, and have each project that uses the app to use those.

The reason I’m interested is that I’m creating a large, reusable app with a heavily customized admin interface, and per-project overrides of the “core” templates aren’t the best solution, since I’d have to copy the custom templates to the template directory of each project that the app gets used in. Releasing new versions of the app with new modifications to those core templates would mean re-copying everything to the affected projects. Ugh.

I understand the reasoning behind the decision to only make a select few templates overridable per-app; after all, if overriding them all was possible, which app’s overridden admin would take precedence?

But in my case, the app will be the “centerpiece” of several client projects, with other apps in those projects merely being in a supporting role.

CSS-based customization of the existing templates only gets you so far, and I’m hesitant to rely on JavaScript DOM manipulation solutions unless absolutely necessary.

One solution that comes to mind is to place the custom base.html etc. templates inside appname/templates/admin/ and then symlink them to the project’s templates folder. That way any updates to the app will automatically take effect on the project level.

Symlinking is probably my method of choice if nothing better is suggested, but I’d like to hear if anyone has a nicer solution.

  • 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-11T19:47:58+00:00Added an answer on May 11, 2026 at 7:47 pm

    As I see your goal is to override templates for entire project, not for app or for model, but you don’t want to put templates in project’s template folder.

    So you should just create ‘base.html’, etc. in ‘your_app/templates/admin’ folder.
    Next you have to tell django that templates should be loaded not only from project’s template folder, but also from your app’s folder.
    This can be done using TEMPLATES_DIR variable in settings.py file, smth. like that:

    TEMPLATE_DIRS = (
        os.path.join(PROJECT_PATH, 'templates'),
        os.path.join(PROJECT_PATH, 'my_app','templates'),
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The permission/authentication documentation for Django 1.4 provides the following snippet for creating custom permissions
I am trying to develop a website with Django following various guides, the documentation
The Django documentation on its CSRF protection states that: In addition, for HTTPS requests,
The Django 1.4 documentation on tests states: For a given Django application, the test
Using Django templates in Google App Engine (on Python), is it possible to compare
Django documentation states: The caveat with using variables or computed values, as in the
I'm creating custom template tags for my django site. I've followed the django documentation
According to Django documentation I've registered my filter: from google.appengine.ext.webapp import template # ...
I want to render a reportlab barchart in a django template. This django documentation
I'm using django-filter app. There is however one problem I do not know how

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.