Ticket #10146: markup_extension_configs_docs.diff

File markup_extension_configs_docs.diff, 2.1 KB (added by bdejong, 14 years ago)

documentation for additional (and django 1.0) markup parameters and settings

  • ref/contrib/index.txt

     
    143143
    144144To activate these filters, add ``'django.contrib.markup'`` to your
    145145:setting:`INSTALLED_APPS` setting. Once you've done that, use ``{% load markup %}`` in
    146 a template, and you'll have access to these filters. For more documentation,
    147 read the source code in django/contrib/markup/templatetags/markup.py.
     146a template, and you'll have access to these filters.
     147
     148For more documentation, read the source code in django/contrib/markup/templatetags/markup.py.
    148149
    149150.. _Textile: http://en.wikipedia.org/wiki/Textile_%28markup_language%29
    150151.. _Markdown: http://en.wikipedia.org/wiki/Markdown
    151152.. _ReST (ReStructured Text): http://en.wikipedia.org/wiki/ReStructuredText
    152153
     154Markdown
     155--------
     156
     157When using the ``markdown`` markup language you can load `markdown extensions`_ by passing
     158them as template parameters:
     159
     160.. code-block:: html+django
     161
     162    {{yourtext|markdown:"wikilink,footnotes"}}
     163
     164You can configure the extensions by defining :setting:`MARKDOWN_FILTER_SETTINGS` in your Django settings.
     165For example, when using the wikilink extension you could use the following options:
     166
     167.. code-block:: python
     168
     169    MARKDOWN_FILTER_SETTINGS = {
     170            'wikilink': [
     171                ('base_url', '/help/'),
     172                ('end_url', '/'), # append slash after all wiki links
     173                ('html_class', 'wikilink') # css class for wiki links
     174            ]
     175        }
     176
     177.. _markdown extensions: http://www.freewisdom.org/projects/python-markdown/Extensions
     178
     179ReStructured Text
     180-----------------
     181
     182When using the `restructuredtext` markup language you can override the restuctured text settings by defining
     183:setting:`RESTRUCTUREDTEXT_FILTER_SETTINGS` in your Django settings. See the `restructuredtext settings`_
     184for details on what these settings are.
     185
     186.. _restructuredtext settings: http://docutils.sourceforge.net/docs/user/config.html#html4css1-writer
     187
    153188redirects
    154189=========
    155190
Back to Top