Ticket #20104: remove_ambiguity_for_versionchanged_directive.diff

File remove_ambiguity_for_versionchanged_directive.diff, 1.9 KB (added by jcatalan, 12 years ago)
  • docs/_ext/djangodocs.py

    diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
    index e539675..4824fac 100644
    a b class VersionDirective(Directive):  
    6464    option_spec = {}
    6565
    6666    def run(self):
     67        if len(self.arguments) > 1:
     68            raise ValueError("Only one argument accepted for directive 'versionchanged::'. "
     69                    "Comments should be provided as content, not as an extra argument.")
     70
    6771        env = self.state.document.settings.env
    6872        ret = []
    6973        node = addnodes.versionmodified()
    7074        ret.append(node)
     75
    7176        if self.arguments[0] == env.config.django_next_version:
    7277            node['version'] = "Development version"
    7378        else:
    7479            node['version'] = self.arguments[0]
     80
    7581        node['type'] = self.name
    76         if len(self.arguments) == 2:
    77             inodes, messages = self.state.inline_text(self.arguments[1], self.lineno+1)
    78             node.extend(inodes)
    79             if self.content:
    80                 self.state.nested_parse(self.content, self.content_offset, node)
    81             ret = ret + messages
     82        if self.content:
     83            self.state.nested_parse(self.content, self.content_offset, node)
    8284        env.note_versionchange(node['type'], node['version'], node, self.lineno)
    8385        return ret
    8486
  • docs/howto/legacy-databases.txt

    diff --git a/docs/howto/legacy-databases.txt b/docs/howto/legacy-databases.txt
    index 6846e4b..4522ca0 100644
    a b access to your precious data on a model by model basis.  
    7575
    7676.. versionchanged:: 1.6
    7777
    78 The behavior by which introspected models are created as unmanaged ones is new
    79 in Django 1.6.
     78    The behavior by which introspected models are created as unmanaged ones is new
     79    in Django 1.6.
    8080
    8181Install the core Django tables
    8282==============================
Back to Top