1

Here is the documentation: (its not that clear to me). http://mezzanine.jupo.org/docs/content-architecture.html#page-templates

Here is a question answered by dollydagr: How to add a custom template page to mezzanine?

The 3rd method he/she offers makes sense but I would like the url slug magic to work instead of playing with urls.py.

If I create a new Mezzanine project and an app called theme. Inside the theme folder I can create a templates directory with a base.html and a index.html.

If I now go to admin and create a new rich text page called blue. What do I have to do to get a blue.html template picked up? (assuming I currently only have base.html and index.html and nothing else).

I've tried a number of combinations to no success.

Update (It works!): Here are the minimum steps to get a custom template for a page working.

sudo pip install mezzanine
mezzanine-project myproject
cd myproject/
python manage.py createdb
python manage.py startapp theme
> Add the theme app to your installed apps in settings.py
mkdir theme/templates
mkdir theme/templates/pages
nano theme/templates/pages/blue.html
> Add text: This is the blue page
python manage.py runserver
> Go to admin (http://127.0.0.1/admin) and add top level page titled blue.
> Browse to http://127.0.0.1/blue
Community
  • 1
  • 1
ab 16
  • 327
  • 2
  • 11

1 Answers1

3

Create template with the filename theme/templates/pages/blue.html and it will be used for page with the blue slug.

catavaran
  • 44,703
  • 8
  • 98
  • 85