Removed duplicate "Deprecated in Django A.B" text in docs.

sphinx 1.2+ adds this text itself.
This commit is contained in:
Tim Graham 2014-06-06 20:31:23 -04:00
parent 5472bf4df0
commit 7f4347b176
2 changed files with 9 additions and 7 deletions

View File

@ -269,7 +269,6 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator):
# that work. # that work.
# #
version_text = { version_text = {
'deprecated': 'Deprecated in Django %s',
'versionchanged': 'Changed in Django %s', 'versionchanged': 'Changed in Django %s',
'versionadded': 'New in Django %s', 'versionadded': 'New in Django %s',
} }
@ -278,11 +277,13 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator):
self.body.append( self.body.append(
self.starttag(node, 'div', CLASS=node['type']) self.starttag(node, 'div', CLASS=node['type'])
) )
title = "%s%s" % ( version_text = self.version_text.get(node['type'])
self.version_text[node['type']] % node['version'], if version_text:
":" if len(node) else "." title = "%s%s" % (
) version_text % node['version'],
self.body.append('<span class="title">%s</span> ' % title) ":" if len(node) else "."
)
self.body.append('<span class="title">%s</span> ' % title)
def depart_versionmodified(self, node): def depart_versionmodified(self, node):
self.body.append("</div>\n") self.body.append("</div>\n")

View File

@ -120,7 +120,8 @@ div.admonition-behind-the-scenes { padding-left:65px; background:url(docicons-be
/*** versoinadded/changes ***/ /*** versoinadded/changes ***/
div.versionadded, div.versionchanged { } div.versionadded, div.versionchanged { }
div.versionadded span.title, div.versionchanged span.title, div.deprecated span.title { font-weight: bold; } div.versionadded span.title, div.versionchanged span.title, span.versionmodified { font-weight: bold; }
div.deprecated { color:#555; }
/*** p-links ***/ /*** p-links ***/
a.headerlink { color: #c60f0f; font-size: 0.8em; padding: 0 4px 0 4px; text-decoration: none; visibility: hidden; } a.headerlink { color: #c60f0f; font-size: 0.8em; padding: 0 4px 0 4px; text-decoration: none; visibility: hidden; }