mirror of
https://github.com/django/django.git
synced 2025-08-11 22:38:20 +00:00
[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
This commit is contained in:
parent
f5b6b25c5f
commit
ab2a2f6695
2 changed files with 11 additions and 9 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue