Permalink
Browse files

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
  • Loading branch information...
1 parent af244e4 commit c61987d75ad9bc5233257f46a8246bb9d63bbbe1 @spookylukey spookylukey committed Oct 10, 2011
@@ -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 @@ def run(self):
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.
Oops, something went wrong.
@@ -125,12 +125,12 @@ moderate comments"``) can approve and delete comments. This can also be
done through the ``admin`` as you'll see later. You might also want to
customize the following templates:
- * ``flag.html``
- * ``flagged.html``
- * ``approve.html``
- * ``approved.html``
- * ``delete.html``
- * ``deleted.html``
+* ``flag.html``
+* ``flagged.html``
+* ``approve.html``
+* ``approved.html``
+* ``delete.html``
+* ``deleted.html``
found under the directory structure we saw for ``form.html``.
@@ -185,9 +185,9 @@ in-built with :doc:`generic comment moderation
</ref/contrib/comments/moderation>`. The comment moderation has the following
features (all of which or only certain can be enabled):
- * Enable comments for a particular model instance.
- * Close comments after a particular (user-defined) number of days.
- * Email new comments to the site-staff.
+* Enable comments for a particular model instance.
+* Close comments after a particular (user-defined) number of days.
+* Email new comments to the site-staff.
To enable comment moderation, we subclass the :class:`CommentModerator` and
register it with the moderation features we want. Let us suppose we want to
@@ -36,49 +36,49 @@ Supported countries
Countries currently supported by :mod:`~django.contrib.localflavor` are:
- * Argentina_
- * Australia_
- * Austria_
- * Belgium_
- * Brazil_
- * Canada_
- * Chile_
- * China_
- * Colombia_
- * Croatia_
- * Czech_
- * Ecuador_
- * Finland_
- * France_
- * Germany_
- * Iceland_
- * India_
- * Indonesia_
- * Ireland_
- * Israel_
- * Italy_
- * Japan_
- * Kuwait_
- * Macedonia_
- * Mexico_
- * `The Netherlands`_
- * Norway_
- * Peru_
- * Poland_
- * Portugal_
- * Paraguay_
- * Romania_
- * Russia_
- * Slovakia_
- * Slovenia_
- * `South Africa`_
- * Spain_
- * Sweden_
- * Switzerland_
- * Turkey_
- * `United Kingdom`_
- * `United States of America`_
- * Uruguay_
+* Argentina_
+* Australia_
+* Austria_
+* Belgium_
+* Brazil_
+* Canada_
+* Chile_
+* China_
+* Colombia_
+* Croatia_
+* Czech_
+* Ecuador_
+* Finland_
+* France_
+* Germany_
+* Iceland_
+* India_
+* Indonesia_
+* Ireland_
+* Israel_
+* Italy_
+* Japan_
+* Kuwait_
+* Macedonia_
+* Mexico_
+* `The Netherlands`_
+* Norway_
+* Peru_
+* Poland_
+* Portugal_
+* Paraguay_
+* Romania_
+* Russia_
+* Slovakia_
+* Slovenia_
+* `South Africa`_
+* Spain_
+* Sweden_
+* Switzerland_
+* Turkey_
+* `United Kingdom`_
+* `United States of America`_
+* Uruguay_
The ``django.contrib.localflavor`` package also includes a ``generic`` subpackage,
containing useful code that is not specific to one particular country or culture.
@@ -1286,13 +1286,13 @@ United States of America (``us``)
A form field that validates input as a U.S. Social Security Number (SSN).
A valid SSN must obey the following rules:
- * Format of XXX-XX-XXXX
- * No group of digits consisting entirely of zeroes
- * Leading group of digits cannot be 666
- * Number not in promotional block 987-65-4320 through 987-65-4329
- * Number not one known to be invalid due to widespread promotional
- use or distribution (e.g., the Woolworth's number or the 1962
- promotional number)
+ * Format of XXX-XX-XXXX
+ * No group of digits consisting entirely of zeroes
+ * Leading group of digits cannot be 666
+ * Number not in promotional block 987-65-4320 through 987-65-4329
+ * Number not one known to be invalid due to widespread promotional
+ use or distribution (e.g., the Woolworth's number or the 1962
+ promotional number)
.. class:: us.forms.USStateField
Oops, something went wrong.

0 comments on commit c61987d

Please sign in to comment.