mirror of https://github.com/django/django.git
[1.5.x] Fixed #19699 - Removed "Please see the release notes" from versionadded/changed directives
Thanks Aymeric for the patch.
Backport of d93edffa89
from master.
This commit is contained in:
parent
2d53799ca6
commit
7b278278ab
|
@ -65,19 +65,13 @@ class VersionDirective(Directive):
|
|||
|
||||
def run(self):
|
||||
env = self.state.document.settings.env
|
||||
arg0 = self.arguments[0]
|
||||
is_nextversion = env.config.django_next_version == arg0
|
||||
ret = []
|
||||
node = addnodes.versionmodified()
|
||||
ret.append(node)
|
||||
if not is_nextversion:
|
||||
if len(self.arguments) == 1:
|
||||
linktext = 'Please see the release notes </releases/%s>' % (arg0)
|
||||
xrefs = roles.XRefRole()('doc', linktext, linktext, self.lineno, self.state)
|
||||
node.extend(xrefs[0])
|
||||
node['version'] = arg0
|
||||
else:
|
||||
if self.arguments[0] == env.config.django_next_version:
|
||||
node['version'] = "Development version"
|
||||
else:
|
||||
node['version'] = self.arguments[0]
|
||||
node['type'] = self.name
|
||||
if len(self.arguments) == 2:
|
||||
inodes, messages = self.state.inline_text(self.arguments[1], self.lineno+1)
|
||||
|
|
Loading…
Reference in New Issue