1

I am trying to customize the theme of Mezzanine. Basically, I am following the tutorials of this and this.

I created a new app theme, copied base.html to the theme/templates folder, and insert the theme in the INSTALLED_APPS in settings.py (note, it is in the first line):

INSTALLED_APPS = (
    "theme",
    "django.contrib.admin",
    "django.contrib.auth",
    ...

I suppose that Mezzanine will find theme's base.html first and use it in stead of the original. But it seems not the case; the original Mezzanine's base.html is still used.

Did I missed anything? Is there a way that I can trace how Mezzanine (or Django) searches for the templates in order to find out what went wrong in the process?

Randy Tang
  • 4,283
  • 12
  • 54
  • 112
  • Can this be true? Because the first line in `.../site-packages/mezzanine/core/templates/index.html` is `{% extends "base.html" %}`. Also, `find . -name "index_base.html" -print` returns nothing: there is no such file. – Randy Tang May 13 '15 at 14:41
  • 1
    Ah-- you're probably right, I'm getting confused. `index.html` is independent of the other pages but does inherit from `base.html`. Is there an `index.html` in your theme's templates? – xnx May 13 '15 at 14:53
  • That's right. I didn't have the `index.html` in `theme`. After adding it, everything works fine. Thanks a lot, xnx. – Randy Tang May 13 '15 at 15:25

1 Answers1

1

Use this tutorial, instead of "theme" in installed app you should have copied the template in your project directory and write it's name there. For instance if you downloaded moderna theme add "moderna" under INSTALLED_APPS = ( "moderna", ...

The link below explains all the steps clearly. How To Deploy: Installing Mezzanine Theme

Community
  • 1
  • 1
Fati
  • 11
  • 2