django-markupwiki/README.rst

62 lines
1.9 KiB
ReStructuredText
Raw Normal View History

2010-03-31 21:48:06 +00:00
=================
django-markupwiki
=================
An implementation of simple markup-agnostic wiki for Django.
markupwiki does not aim to be a full fledged replacement to mediawiki or other
large packages, but instead to provide the most commonly used subset of
functionality. Pages can be edited, locked, and deleted. Revisions can be
viewed, reverted, and compared. If you need much more than that markupwiki
might not be for you.
Requirements
------------
django-markupwiki depends on django 1.2+, django-markupfield 1.0.0b+ and
libraries for whichever markup options you wish to include.
2010-03-31 21:48:06 +00:00
Settings
========
To best make use of MarkupField you should define the
``MARKUPWIKI_MARKUP_TYPES`` setting, a dictionary of strings to callables that
2010-03-31 21:48:06 +00:00
'render' a markup type::
import markdown
from docutils.core import publish_parts
def render_rest(markup):
parts = publish_parts(source=markup, writer_name="html4css1")
return parts["fragment"]
MARKUPWIKI_MARKUP_TYPES = {
2010-03-31 21:48:06 +00:00
'markdown': markdown.markdown,
'ReST': render_rest,
}
If you do not define a ``MARKUPWIKI_MARKUP_TYPES`` then one is provided with the
2010-03-31 21:48:06 +00:00
following markup types available:
html:
allows HTML, potentially unsafe
plain:
plain text markup, calls urlize and replaces text with linebreaks
markdown:
default `markdown`_ renderer (only if `python-markdown`_ is installed)
restructuredtext:
default `ReST`_ renderer (only if `docutils`_ is installed)
textile:
default `textile`_ renderer (only if `textile`_ is installed)
.. _`markdown`: http://daringfireball.net/projects/markdown/
.. _`ReST`: http://docutils.sourceforge.net/rst.html
.. _`textile`: http://hobix.com/textile/quick.html
.. _`python-markdown`: http://www.freewisdom.org/projects/python-markdown/
.. _`docutils`: http://docutils.sourceforge.net/
.. _`python-textile`: http://pypi.python.org/pypi/textile