parts/django/docs/ref/contrib/markup.txt
changeset 69 c6bca38c1cbf
equal deleted inserted replaced
68:5ff1fc726848 69:c6bca38c1cbf
       
     1 =====================
       
     2 django.contrib.markup
       
     3 =====================
       
     4 
       
     5 .. module:: django.contrib.markup
       
     6    :synopsis: A collection of template filters that implement common markup languages.
       
     7 
       
     8 Django provides template filters that implement the following markup
       
     9 languages:
       
    10 
       
    11     * ``textile`` -- implements `Textile`_ -- requires `PyTextile`_
       
    12     * ``markdown`` -- implements `Markdown`_ -- requires `Python-markdown`_
       
    13     * ``restructuredtext`` -- implements `reST (reStructured Text)`_
       
    14       -- requires `doc-utils`_
       
    15 
       
    16 In each case, the filter expects formatted markup as a string and
       
    17 returns a string representing the marked-up text. For example, the
       
    18 ``textile`` filter converts text that is marked-up in Textile format
       
    19 to HTML.
       
    20 
       
    21 To activate these filters, add ``'django.contrib.markup'`` to your
       
    22 :setting:`INSTALLED_APPS` setting. Once you've done that, use
       
    23 ``{% load markup %}`` in a template, and you'll have access to these filters.
       
    24 For more documentation, read the source code in
       
    25 :file:`django/contrib/markup/templatetags/markup.py`.
       
    26 
       
    27 .. _Textile: http://en.wikipedia.org/wiki/Textile_%28markup_language%29
       
    28 .. _Markdown: http://en.wikipedia.org/wiki/Markdown
       
    29 .. _reST (reStructured Text): http://en.wikipedia.org/wiki/ReStructuredText
       
    30 .. _PyTextile: http://loopcore.com/python-textile/
       
    31 .. _Python-markdown: http://www.freewisdom.org/projects/python-markdown
       
    32 .. _doc-utils: http://docutils.sf.net/
       
    33 
       
    34 reStructured Text
       
    35 -----------------
       
    36 
       
    37 When using the ``restructuredtext`` markup filter you can define a
       
    38 :setting:`RESTRUCTUREDTEXT_FILTER_SETTINGS` in your django settings to
       
    39 override the default writer settings. See the `restructuredtext writer
       
    40 settings`_ for details on what these settings are.
       
    41 
       
    42 .. _restructuredtext writer settings: http://docutils.sourceforge.net/docs/user/config.html#html4css1-writer