Ticket #9436: 9436.3.diff
File 9436.3.diff, 3.9 KB (added by , 16 years ago) |
---|
-
docs/_ext/djangodocs.py
diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py index bda7d3e..65a823e 100644
a b import sphinx.builder 10 10 import sphinx.directives 11 11 import sphinx.environment 12 12 import sphinx.htmlwriter 13 import sphinx.roles 14 from docutils import nodes 13 15 14 16 def setup(app): 15 17 app.add_crossref_type( … … def setup(app): 44 46 indextemplate = "pair: %s; django-admin command-line option", 45 47 parse_node = lambda env, sig, signode: sphinx.directives.parse_option_desc(signode, sig), 46 48 ) 49 app.add_config_value('django_next_version', '0.0', True) 50 app.add_directive('versionadded', parse_version_directive, 1, (1, 1, 1)) 51 app.add_directive('versionchanged', parse_version_directive, 1, (1, 1, 1)) 47 52 app.add_transform(SuppressBlockquotes) 48 53 49 54 # Monkeypatch PickleHTMLBuilder so that it doesn't die in Sphinx 0.4.2 50 55 if sphinx.__version__ == '0.4.2': 51 56 monkeypatch_pickle_builder() 57 58 def parse_version_directive(name, arguments, options, content, lineno, 59 content_offset, block_text, state, state_machine): 60 env = state.document.settings.env 61 is_nextversion = env.config.django_next_version == arguments[0] 62 ret = [] 63 node = sphinx.addnodes.versionmodified() 64 ret.append(node) 65 if not is_nextversion: 66 if len(arguments) == 1: 67 linktext = 'Please, see the release notes <releases-%s>' % (arguments[0]) 68 xrefs = sphinx.roles.xfileref_role('ref', linktext, linktext, lineno, state) 69 node.extend(xrefs[0]) 70 node['version'] = arguments[0] 71 else: 72 node['version'] = "Development version" 73 node['type'] = name 74 if len(arguments) == 2: 75 inodes, messages = state.inline_text(arguments[1], lineno+1) 76 node.extend(inodes) 77 if content: 78 state.nested_parse(content, content_offset, node) 79 ret = ret + messages 80 env.note_versionchange(node['type'], node['version'], node, lineno) 81 return ret 82 52 83 53 84 class SuppressBlockquotes(docutils.transforms.Transform): 54 85 """ -
docs/conf.py
diff --git a/docs/conf.py b/docs/conf.py index 0d41b05..f7ff452 100644
a b copyright = 'Django Software Foundation and contributors' 44 44 version = '1.0' 45 45 # The full version, including alpha/beta/rc tags. 46 46 release = version 47 # The next version to be released 48 django_next_version = '1.1' 47 49 48 50 # There are two options for replacing |today|: either, you set today to some 49 51 # non-false value, then it is used: -
docs/topics/testing.txt
diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt index bd68f6b..3588519 100644
a b arguments at time of construction: 570 570 571 571 .. method:: Client.head(path, data={}) 572 572 573 .. versionadded:: development573 .. versionadded:: 1.1 574 574 575 575 Makes a HEAD request on the provided ``path`` and returns a ``Response`` 576 576 object. Useful for testing RESTful interfaces. Acts just like … … arguments at time of construction: 578 578 579 579 .. method:: Client.options(path, data={}) 580 580 581 .. versionadded:: development581 .. versionadded:: 1.1 582 582 583 583 Makes an OPTIONS request on the provided ``path`` and returns a 584 584 ``Response`` object. Useful for testing RESTful interfaces. 585 585 586 586 .. method:: Client.put(path, data={}, content_type=MULTIPART_CONTENT) 587 587 588 .. versionadded:: development588 .. versionadded:: 1.1 589 589 590 590 Makes an PUT request on the provided ``path`` and returns a 591 591 ``Response`` object. Useful for testing RESTful interfaces. Acts just … … arguments at time of construction: 593 593 594 594 .. method:: Client.delete(path) 595 595 596 .. versionadded:: development596 .. versionadded:: 1.1 597 597 598 598 Makes an DELETE request on the provided ``path`` and returns a 599 599 ``Response`` object. Useful for testing RESTful interfaces.