Commit c61987d7 authored by Luke Plant's avatar Luke Plant
Browse files

Removed use of non-standard indentation rules in docs, and the custom...

Removed use of non-standard indentation rules in docs, and the custom transform that supported them.

Doc writers should be aware that we are now back to normal ReST rules
regarding blockquotes.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16955 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent af244e47
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@ def setup(app):
    app.add_config_value('django_next_version', '0.0', True)
    app.add_directive('versionadded', VersionDirective)
    app.add_directive('versionchanged', VersionDirective)
    app.add_transform(SuppressBlockquotes)
    app.add_builder(DjangoStandaloneHTMLBuilder)


@@ -99,27 +98,6 @@ class VersionDirective(Directive):
        return ret


class SuppressBlockquotes(transforms.Transform):
    """
    Remove the default blockquotes that encase indented list, tables, etc.
    """
    default_priority = 300

    suppress_blockquote_child_nodes = (
        nodes.bullet_list,
        nodes.enumerated_list,
        nodes.definition_list,
        nodes.literal_block,
        nodes.doctest_block,
        nodes.line_block,
        nodes.table
    )

    def apply(self):
        for node in self.document.traverse(nodes.block_quote):
            if len(node.children) == 1 and isinstance(node.children[0], self.suppress_blockquote_child_nodes):
                node.replace_self(node.children[0])

class DjangoHTMLTranslator(SmartyPantsHTMLTranslator):
    """
    Django-specific reST to HTML tweaks.
+196 −194
Original line number Diff line number Diff line
@@ -833,6 +833,7 @@ Specify one or more of ``params``, ``select``, ``where`` or ``tables``. None
of the arguments is required, but you should use at least one of them.

* ``select``

  The ``select`` argument lets you put extra fields in the ``SELECT``
  clause.  It should be a dictionary mapping attribute names to SQL
  clauses to use to calculate that attribute.
@@ -898,6 +899,7 @@ of the arguments is required, but you should use at least one of them.
  like this isn't detected. That will lead to incorrect results.

* ``where`` / ``tables``

  You can define explicit SQL ``WHERE`` clauses — perhaps to perform
  non-explicit joins — by using ``where``. You can manually add tables to
  the SQL ``FROM`` clause by using ``tables``.
+9 −9

File changed.

Contains only whitespace changes.

+50 −50

File changed.

Contains only whitespace changes.

+3 −3

File changed.

Contains only whitespace changes.

+157 −157

File changed.

Contains only whitespace changes.

+92 −92

File changed.

Contains only whitespace changes.

+291 −291

File changed.

Contains only whitespace changes.

Loading