Restructured Text plugin for Django CMS.
A plugin for Django CMS, which renders restructured text into html, using docutils.
Install cmsplugin_rst using pip or your favorite method, using a virtualenv or not.
$ pip install cmsplugin_rst
Add 'cmsplugin_rst' to your INSTALLED_APPS, in your django settings.
And then migrate the DB:
$ python manage.py migrate
Beware, if you upgrade from cmsplugin_rst v0.1.1, which didn’t use django migrations but South, you may have to skip the initial migration (eg. if you get the “OperationalError: table “cmsplugin_rst_rstpluginmodel” already exists” error):
$ python manage.py migrate –fake-initial cmsplugin_rst
To speed up the (potentially heavy) rendering of cmsplugin_rst plugins, consider using the cache framework of django.
The behaviour of cmsplugin_rst can be tweaked with these Django settings (all are optional).
The plugin disallows, by default, insecure features like *file insertions* and *raw* directive, in the restructured text renderer.
The restructured text is not evaluated by the django template engine, so you can’t use django/djangocms tags and filters.
But some specific replacements take place:
Additionally, you can create links to other CMS pages with the custom “cmspage” role provided, using the “reverse IDs” that you’ll have set previously in advanced page parameters:
:cmspage:`My-Reverse-Id` // the menu title will be use as the link name :cmspage:`My Link Name <My-Reverse-Id>` // here the link name is embedded in role
Reverse IDs must exist and be unique in the djangocms DB, else the rendering of the link fails.
A demo project with a sqlite DB is included in repository, as a git submodule (https://git-scm.com/docs/git-submodule).
Its django admin credentials are test/test.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|cmsplugin-rst-0.2.tar.gz (7.1 kB) Copy SHA256 Checksum SHA256||–||Source||Jul 3, 2016|
|cmsplugin-rst-0.2.zip (11.6 kB) Copy SHA256 Checksum SHA256||–||Source||Jul 3, 2016|