Commits

Fabian Büchler committed f60e98c

Replaced Sphinx's autodata directive with manual py:data directives since it includes the current values of the documented objects.

Comments (0)

Files changed (4)

docs/installation.rst

 behaviour of django-markupmirror:
 
 .. automodule:: markupmirror.settings
-   :members:
+
+.. py:data:: MARKUPMIRROR_DEFAULT_MARKUP_TYPE
+
+   Defines any of the :ref:`default markup-types <usage-markup-types-default>`
+   as default for fields where no ``markup_type`` or ``default_markup_type``
+   has been set explicitly.
+
+   Defaults to ``plaintext``.
+
+.. py:data:: MARKUPMIRROR_MARKDOWN_EXTENSIONS
+
+   Defines the extensions to load for `Markdown`_. Markdown's package
+   documentation contains `a list of available extensions`_.
+
+   Defaults to ``['extra', 'headerid(level=2)']``.
+
+.. py:data:: MARKUPMIRROR_MARKDOWN_OUTPUT_FORMAT
+
+   Defines the output format for Markdown. One of ``HTML4``, ``XHTML`` and
+   ``HTML5``.
+
+   Defaults to ``HTML5``.
+
+.. py:data:: MARKUPMIRROR_TEXTILE_SETTINGS
+
+   Dictionary of arguments passed directly to the Textile converter defined in
+   ``textile.functions.textile``.
+
+   The converter's default function signature is:
+   ``head_offset=0, html_type='xhtml', auto_link=False, encoding=None,
+   output=None``.
+
+   Defaults to: ``{'encoding': 'utf-8', 'output': 'utf-8'}``
+
+.. py:data:: MARKUPMIRROR_FEINCMS_INIT_TEMPLATE
+
+   Defines the template used by FeinCMS to initialize Pages with
+   ``MarkupMirrorContent`` blocks.
+
+   .. deprecated:: 0.1a2
+      This will soon be obsolete due to a generic jQuery plugin to initialize
+      the CodeMirror editor anywhere.
+
+.. py:data:: MARKUPMIRROR_FEINCMS_INIT_CONTEXT
+
+   Context passed to the ``MARKUPMIRROR_FEINCMS_INIT_TEMPLATE``.
+
+   .. deprecated:: 0.1a2
+      This will soon be obsolete due to a generic jQuery plugin to initialize
+      the CodeMirror editor anywhere.
+
+
+.. _Markdown: http://daringfireball.net/projects/markdown/
+.. _Markdown's package documentation: http://packages.python.org/Markdown/
+.. _a list of available extensions:
+    http://packages.python.org/Markdown/extensions/
 The markup pool is the main access point to markup converters. They are
 registered with the pool, and retrieved from it.
 
-.. autodata:: markupmirror.markup.base.markup_pool
+.. py:data:: markupmirror.markup.base.markup_pool
+
+   Instance of ``MarkupPool`` for public use.
 
 .. autoclass:: markupmirror.markup.base.MarkupPool
    :members:

markupmirror/markup/base.py

         self.unregister_markup(key)
 
 
-markup_pool = MarkupPool()
-"""Instance of ``MarkupPool`` for public use."""
-
+markup_pool = MarkupPool()  # Instance of ``MarkupPool`` for public use.
 register_markup = markup_pool.register_markup
 
 

markupmirror/settings.py

 from django.conf import settings
 
 
+# Default markup type
+# Used for fields which have no markup_type or default_markup_type assigned
+# before a markup_type has been selected by the user (selectbox).
 MARKUPMIRROR_DEFAULT_MARKUP_TYPE = getattr(settings,
     'MARKUPMIRROR_DEFAULT_MARKUP_TYPE', 'plaintext')
-"""Defines any of the :ref:`default markup-types <usage-markup-types-default>`
-as default for fields where no ``markup_type`` or ``default_markup_type``
-has been set explicitly.
 
-Defaults to ``plaintext``.
-
-"""
 
 # CodeMirror settings
 
 MARKUPMIRROR_MARKDOWN_EXTENSIONS = getattr(settings,
     'MARKUPMIRROR_MARKDOWN_EXTENSIONS',
     ['extra', 'headerid(level=2)'])
-"""Defines the extensions to load for `Markdown`_. `Markdown's package
-documentation`_ contains `a list of available extensions`_.
 
-Defaults to ``['extra', 'headerid(level=2)']``.
-
-.. _Markdown: http://daringfireball.net/projects/markdown/
-.. _Markdown's package documentation: http://packages.python.org/Markdown/
-.. _a list of available extensions:
-    http://packages.python.org/Markdown/extensions/
-
-"""
 MARKUPMIRROR_MARKDOWN_OUTPUT_FORMAT = getattr(settings,
     'MARKUPMIRROR_MARKDOWN_OUTPUT_FORMAT',
     'html5')
-"""Defines the output format for Markdown. One of ``HTML4``, ``XHTML`` and
-``HTML5``.
 
-Defaults to ``HTML5``.
-
-"""
 
 # Textile settings
 MARKUPMIRROR_TEXTILE_SETTINGS = getattr(settings,
     'MARKUPMIRROR_TEXTILE_SETTINGS',
     {'encoding': 'utf-8', 'output': 'utf-8'})
-"""Dictionary of arguments passed directly to the Textile converter defined in
-``textile.functions.textile``.
-
-The converter's default function signature is:
-``head_offset=0, html_type='xhtml', auto_link=False, encoding=None,
-output=None``.
-
-Defaults to: ``{'encoding': 'utf-8', 'output': 'utf-8'}``
-
-"""
 
 
 # Settings for MarkupMirrorContent for FeinCMS
 MARKUPMIRROR_FEINCMS_INIT_TEMPLATE = getattr(settings,
     'MARKUPMIRROR_FEINCMS_INIT_TEMPLATE',
     'admin/markupmirror/feincms/init_codemirror.html')
-"""Defines the template used by FeinCMS to initialize Pages with
-``MarkupMirrorContent`` blocks.
 
-.. deprecated:: 0.1a2
-   This will soon be obsolete due to a generic jQuery plugin to initialize
-   the CodeMirror editor anywhere.
-
-"""
 # Context for init template
 MARKUPMIRROR_FEINCMS_INIT_CONTEXT = getattr(settings,
     'MARKUPMIRROR_FEINCMS_INIT_CONTEXT', {
         'CODEMIRROR_WIDTH': '50%',
         'CODEMIRROR_HEIGHT': '300px',
     })
-"""Context passed to the ``MARKUPMIRROR_FEINCMS_INIT_TEMPLATE``.
-
-.. deprecated:: 0.1a2
-   This will soon be obsolete due to a generic jQuery plugin to initialize
-   the CodeMirror editor anywhere.
-
-"""