Skip to content
Myr

In 0.7, make_default_options_response is a public API

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 43ae651 · Browse files · 2 files+12 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+12 added−2 removed

  • other:+12 added−2 removed

2 files+12 added−2 removed

modified:flask/app.py+8 added-2 removed
688 unmodified lines
689 rule = req.url_rule690 # if we provide automatic options for this URL and the691 # request came with the OPTIONS method, reply automatically 692 if rule.provide_automatic_options and req.method == 'OPTIONS':693 return self._make_default_options_response()693 return self.make_default_options_response()694 # otherwise dispatch to the handler for that endpoint695 return self.view_functions[rule.endpoint](**req.view_args)696 except HTTPException, e:697 return self.handle_http_exception(e)698699 def _make_default_options_response(self):699 def make_default_options_response(self):700 """This method is called to create the default `OPTIONS` response.701 This can be changed through subclassing to change the default702 behaviour of `OPTIONS` responses.703704 .. versionadded:: 0.7705 """706 # This would be nicer in Werkzeug 0.7, which however currently707 # is not released. Werkzeug 0.7 provides a method called708 # allowed_methods() that returns all methods that are valid for709 # a given path.
186 unmodified lines
modified:CHANGES+4 added
6 unmodified lines
7-----------89Release date to be announced, codename to be selected1011- Added :meth:`~flask.Flask.make_default_options_response`12 which can be used by subclasses to alter the default13 behaviour for `OPTIONS` responses.1415Version 0.6.116-------------1718Bugfix release, release date to be announced.
150 unmodified lines