{ "info": { "author": "Martin Mahner", "author_email": "martin@mahner.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Utilities" ], "description": ".. warning:: django-rstify is not in active development! Please take a look at it's successor django-markup. https://github.com/bartTC/django-markup\r\n\r\n===============================================================\r\ndjango-rstify - A restructured text filter for django templates\r\n===============================================================\r\n\r\ndjango-rstify is a set of template filters to provide easy conversion from\r\n`restructured text`_ to HTML. Besides this basic functionality this application\r\nallows you to highlight sourcecode snippets inside your text using the `pygments`_\r\nlibrary.\r\n\r\n.. hint:: Django already provides a simple `restructured text filter`_. If you\r\n don't need the extras in this application, I recommend to use the *core version*.\r\n\r\nInstallation\r\n============\r\n\r\nThere are several ways to install this application:\r\n\r\n1. Checkout the latest version from my git repository::\r\n\r\n git clone git://github.com/bartTC/django-rstify.git\r\n\r\n Then either put the directory ``rstify`` into your pythonpath or\r\n switch to ``django-rstify`` and do ``python setup.py install``.\r\n\r\n2. Install this application using easy_install::\r\n\r\n easy_install django-rstify\r\n\r\nFinally, put ``rstify`` into your ``INSTALLED_APPS`` setting in your django project.\r\n\r\nHow to use it in templates\r\n==========================\r\n\r\nTo convert a restructured text from an object to HTML simply apply the ``rstify``\r\nfilter on it::\r\n\r\n {% load rstify_tags %}\r\n\r\n {{ entry.content|rstify }}\r\n\r\nIf you want to convert inline content, use the ``filter`` templatetag around::\r\n\r\n {% load rstify_tags %}\r\n\r\n {% filter rstify %}\r\n This is some *restructured text*.\r\n {% endfilter %}\r\n\r\nHow to use it in sourcecode\r\n===========================\r\n\r\nApplying this filter inside your code is easy::\r\n\r\n >>> from rstify import rstify\r\n >>>\r\n >>> print rstify('This is *restructured text*.')\r\n
This is restructured text.
\r\n\r\nInitial Header Level\r\n====================\r\n\r\nBy default the initial heading in your restructured text becomes a ``