summaryrefslogtreecommitdiff
path: root/docs/_ext
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-06-06 20:31:23 -0400
committerTim Graham <timograham@gmail.com>2014-06-07 07:27:13 -0400
commitab2a2f669563cea542a721fcbc907bb7c93d6e1f (patch)
treed15d0bf351e6866e746d37c60db63bdd98973610 /docs/_ext
parentf5b6b25c5f9acbb336d87d1ef87722caca5c1d3e (diff)
[1.6.x] Removed duplicate "Deprecated in Django A.B" text in docs.
sphinx 1.2+ adds this text itself. Backport of 7f4347b176 from master
Diffstat (limited to 'docs/_ext')
-rw-r--r--docs/_ext/djangodocs.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
index 71a8780cee..47c7e2ce6d 100644
--- a/docs/_ext/djangodocs.py
+++ b/docs/_ext/djangodocs.py
@@ -134,20 +134,21 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator):
# that work.
#
version_text = {
- 'deprecated': 'Deprecated in Django %s',
- 'versionchanged': 'Changed in Django %s',
- 'versionadded': 'New in Django %s',
+ 'versionchanged': 'Changed in Django %s',
+ 'versionadded': 'New in Django %s',
}
def visit_versionmodified(self, node):
self.body.append(
self.starttag(node, 'div', CLASS=node['type'])
)
- title = "%s%s" % (
- self.version_text[node['type']] % node['version'],
- ":" if len(node) else "."
- )
- self.body.append('<span class="title">%s</span> ' % title)
+ version_text = self.version_text.get(node['type'])
+ if version_text:
+ title = "%s%s" % (
+ version_text % node['version'],
+ ":" if len(node) else "."
+ )
+ self.body.append('<span class="title">%s</span> ' % title)
def depart_versionmodified(self, node):
self.body.append("</div>\n")