Ticket #19699: 19699.patch

File 19699.patch, 1.1 KB (added by aaugustin, 3 years ago)
  • docs/_ext/djangodocs.py

    diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
    index 3d85147..6c0e189 100644
    a b class VersionDirective(Directive): 
    6565
    6666    def run(self):
    6767        env = self.state.document.settings.env
    68         arg0 = self.arguments[0]
    69         is_nextversion = env.config.django_next_version == arg0
    7068        ret = []
    7169        node = addnodes.versionmodified()
    7270        ret.append(node)
    73         if not is_nextversion:
    74             if len(self.arguments) == 1:
    75                 linktext = 'Please see the release notes </releases/%s>' % (arg0)
    76                 xrefs = roles.XRefRole()('doc', linktext, linktext, self.lineno, self.state)
    77                 node.extend(xrefs[0])
    78             node['version'] = arg0
    79         else:
     71        if self.arguments[0] == env.config.django_next_version:
    8072            node['version'] = "Development version"
     73        else:
     74            node['version'] = self.arguments[0]
    8175        node['type'] = self.name
    8276        if len(self.arguments) == 2:
    8377            inodes, messages = self.state.inline_text(self.arguments[1], self.lineno+1)
Back to Top