Trying to install theme: mezzanine-html5boilerplate

1,083 views
Skip to first unread message

DakotaPete

unread,
Sep 9, 2011, 5:44:58 PM9/9/11
to Mezzanine Users
Hi -

Kind of a newbie, here.

I'm trying to install mezzanine-html5boilerplate, as per the
instructions at
http://readthedocs.org/docs/mezzanine/en/latest/themes.html, but
I cannot find a setup.py file, so the command: python setup.py
install fails.

Suggestions?

P.S. Please type slow as sometimes I get lost in the Python/Django/
Mezzanine jargon.

Thanks.

Pete S. Aumann

Brent Hoover

unread,
Sep 10, 2011, 5:10:11 PM9/10/11
to mezzani...@googlegroups.com
For this packages it's even easier since you actually don't need to install anything. Just drop the contents of the directory you checked out into the root of your project, and add the name of the directory to your INSTALLED_APPS settings.

So if you cloned out mezzanine-html5boilerplate just copy the directory out into your project like this:

(Notice that I changed the dash to an underscore, probably a name like "mytheme" might work better, but I don't want to complicate it)

myprojectroot/
                  /mezzanine_html5boilerplate/
                                                          /templates
                                                          /templatetags
                                                         /etc...

Then in settings.py change your INSTALLED_APPS so it looks like so:


    .....<other_apps_snipped>
    "mezzanine.generic",
    "mezzanine.blog",
    "mezzanine.forms",
    "mezzanine.pages",
    "mezzanine_html5boilerplate",


Then while you are working on modifying the theme, you will want to add:
THEME="mezzanine_html5boilerplate"
Which allow mezzanine to use the theme without installing it.

Why does this work? Or "why did I need to do this?"

Django "apps" can reside either in your site-packages directory or in your project itself. When you add that application to your INSTALLED_APPS, in a typical installation this will do a couple things (and more, not applicable)
If there is a directory called "templates" in that directory it will include it in the template_search path,
If there is a "templatetags" directory it will include those as well.

Hope that helps.

--Brent

Diacre Bayishime

unread,
Jun 21, 2012, 12:30:56 PM6/21/12
to mezzani...@googlegroups.com
I tried this but it doesn't work for me. It still shows the default theme. 
Am I missing something? 
Do I have to change the media path and urls?

zgohr

unread,
Jun 21, 2012, 12:38:05 PM6/21/12
to mezzani...@googlegroups.com
Make sure the app is listed above the Mezzanine apps in INSTALLED_APPS. You should no longer need the "THEME" setting, depending on your Mezzanine version.

Brian Schott

unread,
Jun 21, 2012, 1:47:44 PM6/21/12
to mezzani...@googlegroups.com
It also needs to go ABOVE mezzanine.  Static file and template discovery is evaluated in the order the apps are loaded.

-------------------------------------------------
Brian Schott, CTO
Nimbis Services, Inc.


Reply all
Reply to author
Forward
0 new messages