django-blog-zinnia / cmsplugin-zinnia

Bridge between django-blog-zinnia and django-cms
BSD 3-Clause "New" or "Revised" License
53 stars 46 forks source link

================ Cmsplugin-zinnia

Cmsplugin-zinnia is a bridge between django-blog-zinnia and django-cms.

This package provides plugins, menus and apphook to integrate your Zinnia powered Weblog into your django-cms Web site.

The code bundled in this application is a copy of the original zinnia.plugins module, made for forward compatibility with django-blog-zinnia > 0.11.

.. contents::

.. _installation:

Installation

Once Zinnia and the CMS are installed, you simply have to register cmsplugin_zinnia, in the INSTALLED_APPS section of your project's settings.

.. _entry-placeholder:

Entries with plugins

If you want to use the plugin system of django-cms in your entries, an extended Entry with a PlaceholderField is provided in this package.

Just add this line in your project's settings to use it. ::

ZINNIA_ENTRY_BASE_MODEL = 'cmsplugin_zinnia.placeholder.EntryPlaceholder'

.. note:: You have to keep in mind that the default migrations bundled with Zinnia do not reflect the addition made by the EntryPlaceholder model.

A solution to initialize correctly the database can be: ::

 $ python manage.py makemigrations
 $ python manage.py migrate

Tips for using the apphook

If you want to use the apphook to provide the blog functionnalities under a specific URL handled by the CMS, remember this tip:

.. _settings:

Settings

CMSPLUGIN_ZINNIA_APP_URLS

Default value: ['zinnia.urls']

The URLsets used for by the Zinnia AppHook.

CMSPLUGIN_ZINNIA_APP_MENUS

Default value: ::

['cmsplugin_zinnia.menu.EntryMenu', 'cmsplugin_zinnia.menu.CategoryMenu', 'cmsplugin_zinnia.menu.TagMenu', 'cmsplugin_zinnia.menu.AuthorMenu']

List of strings representing the path to the Menu class provided by the Zinnia AppHook.

CMSPLUGIN_ZINNIA_HIDE_ENTRY_MENU

Default value: True

Boolean used for displaying or not the entries in the EntryMenu object.

CMSPLUGIN_ZINNIA_TEMPLATES

Default value: [] (Empty list)

List of tuple for extending the plugins rendering templates.

Example: ::

CMSPLUGIN_ZINNIA_TEMPLATES = [ ('entry_custom.html', 'Entry custom'), ('entry_custom_bis.html', 'Entry custom bis') ]

.. _changelog:

Changelog

0.8.1

0.8

0.7

0.6

0.5.1

0.5

0.4.1

0.4

0.3

0.2

0.1

.. _django-blog-zinnia: http://django-blog-zinnia.com/ .. _django-cms: http://django-cms.com/