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:25:02 -0400
commita517e9ac857dd4d022cd77f742dd0848fbaec5d1 (patch)
tree1bafbc71b926a3e40869194fba557c2a5b58b745 /docs/_ext
parentc8c1883962ebb0668663134e023ffbe1c753a450 (diff)
[1.7.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.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
index 0a134e775f..6770ff46ac 100644
--- a/docs/_ext/djangodocs.py
+++ b/docs/_ext/djangodocs.py
@@ -269,7 +269,6 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator):
# that work.
#
version_text = {
- 'deprecated': 'Deprecated in Django %s',
'versionchanged': 'Changed in Django %s',
'versionadded': 'New in Django %s',
}
@@ -278,11 +277,13 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator):
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")