Fixed #19699 - Removed "Please see the release notes" from versionadded/changed directives

Also bumped django_next_version back to 1.6 so those
annotations are described as "the development version"
in the docs.

Thanks Aymeric for the patch.
This commit is contained in:
Tim Graham 2013-02-09 09:16:10 -05:00
parent 0201b9d6d8
commit d93edffa89
2 changed files with 5 additions and 11 deletions

View File

@ -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)

View File

@ -70,8 +70,8 @@ else:
release = django_release()
# The next version to be released
django_next_version = '1.7'
# The "development version" of Django
django_next_version = '1.6'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.