This is a plugin of django-cms-2.0 for adding restructured text into your pages. It's based on BSD License, so please share it as what you want.
It supports pygment code highlight. You need to install pygment.
- copy media/cmsplugin_rst and media/markitup folders to your media folder
- add cmsplugin_rst into INSTALLED_APP of your settings
- run ./manage.py syncdb
.. code:: python :linenos: import os, path from django.conf import settings class MyNewCode(object): pass
ps: if you don't like the line numbers, just get rid of :linenos:. from version 0.0.2 alaph, editor support prompt a dialog to input your code. So you don't need to write .. code:: python every time.
If you want to custom style, change cmsplugin_rst.css to fit for your site. Also you could write your own directives and put them in folder directives.