/django-easy-pages

Simpler than a full CMS, but more powerful than flatpages.

Primary LanguagePython

django-easy-pages strikes a ballance between the simplicity of flatpages and
the power of a full-fledged CMS.

It offers pages composed of one or more content blocks, handles embedding
of media, auto-generates menus and also allows individual content blocks to
be used within pages generated by other views.

A Page object can be either injected into every ContextResponse using a
context processor, or can be accessed in individual pages using a template tag.

When rendering a response that isn't registered as a page itself, a dummy
page object is returned that offers some of the same interfaces. (in progress)

Caching greatly enhances performance.


##Installation

pip install django-easy-pages
put 'easy_pages' in your list of installed apps
put 'easy_pages.context_processors.page' in your TEMPLATE_CONTEXT_PROCESSORS list
create a default template in 'easy_pages/default.html'

assumes that settings.PROJECT_ROOT contains the absolute path to the project root.


##Page Types

page_type is one of: content, link or category

###Content Pages

A content Page is a container for zero or more content blocks
ContentBlock with ContentBlockType "main" (which is the only one automatically created)
is given special consideration



page.blocks.all()
page.blocks.main.content

page.blocks.filter(types

page.blocks.by_name
page.blocks.by_type

page.block.NAME
page.blocks.TYPE