Ticket #9436: 9436.2.diff
File 9436.2.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 5640016..7e7998d 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 ec9ee8a..f6fdd28 100644
a b arguments at time of construction: 546 546 547 547 .. method:: Client.head(path, data={}) 548 548 549 .. versionadded:: development549 .. versionadded:: 1.1 550 550 551 551 Makes a HEAD request on the provided ``path`` and returns a ``Response`` 552 552 object. Useful for testing RESTful interfaces. Acts just like … … arguments at time of construction: 554 554 555 555 .. method:: Client.options(path, data={}) 556 556 557 .. versionadded:: development557 .. versionadded:: 1.1 558 558 559 559 Makes an OPTIONS request on the provided ``path`` and returns a 560 560 ``Response`` object. Useful for testing RESTful interfaces. 561 561 562 562 .. method:: Client.put(path, data={}, content_type=MULTIPART_CONTENT) 563 563 564 .. versionadded:: development564 .. versionadded:: 1.1 565 565 566 566 Makes an PUT request on the provided ``path`` and returns a 567 567 ``Response`` object. Useful for testing RESTful interfaces. Acts just … … arguments at time of construction: 569 569 570 570 .. method:: Client.delete(path) 571 571 572 .. versionadded:: development572 .. versionadded:: 1.1 573 573 574 574 Makes an DELETE request on the provided ``path`` and returns a 575 575 ``Response`` object. Useful for testing RESTful interfaces.