one-page design helper for Mezzanine
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
onepage
.gitignore
LICENSE
README.org
setup.py

README.org

mezzanine-onepage

One-Page design helper for Mezzanine.

disclaimer

This is some beta and only partially tested bits of code, use it only if you understand how it is suppose to work. Bug reports, comments and pull requests are welcome !

overview

Some times you need to publish a shiny super cool one-page site on top of nifty bleeding edge JS and SASS technologies. But you still want your users able to manage their content as usual trough Mezzanine interface, i.e. let them add sections as it was pages.

This micro app provides a way to declare a page as being part of a “one page” design tree. When doing so, the page content is added to the parent’s content as an html 5 section with slugged page.title as html id.

This works for RichTextPage, Form and Gallery. Everything can be nested as usual and each page can still be accessed with its slug as before.

Forms are handled by a little bit of ajax and a custom page processor.

Installation

  1. Either clone this repository and copy the “onepage” directory in your Mezzanine project, or use pip :
    pip install git+https://github.com/lucmilland/mezzanine-onepage
        
  2. edit your settings.py to add onepage to your INSTALLED_APPS .
  3. still in settings.py, add the required in_opd extra model field :
    EXTRA_MODEL_FIELDS = (
        (
            "mezzanine.pages.models.Page.in_opd",
            "BooleanField",
            ("In a One-page design",),
            {"default": False},
        ),
    )
        
  4. migrate your database if still not done :
    python manage.py migrate onepage
        

That’s all, you’re done.

Usage

For each page that you want to include in it’s parent, just check the in a One-Page design box in the admin.

Customize

Customizing templates/includes/*.html and templates/pages/page.html should provide you an easy way to adapt the default behaviour to your need ;)