Skip to content
Myr

Use American English for "behavior" in docs.

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

Prompted by plaes on #pocoo, mitsuhiko confirmed to use American English.

authored by Ron DuPlain · committed by Ron DuPlain · parent 10c34e6 · Browse files · 10 files+18 added−18 removed
This commit

State

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

Diff stats

10 files+18 added−18 removed

  • other:+18 added−18 removed

10 files+18 added−18 removed

modified:docs/patterns/jquery.rst+1 added-1 removed
151 unmodified lines
152 browser is done loading the basic parts of the page.1532. ``$('selector')`` selects an element and lets you operate on it.1543. ``element.bind('event', func)`` specifies a function that should run155 when the user clicked on the element. If that function returns156 `false`, the default behaviour will not kick in (in this case, navigate156 `false`, the default behavior will not kick in (in this case, navigate157 to the `#` URL).1584. ``$.getJSON(url, data, func)`` sends a `GET` request to `url` and will159 send the contents of the `data` object as query parameters. Once the160 data arrived, it will call the given function with the return value as
7 unmodified lines
modified:docs/patterns/mongokit.rst+1 added-1 removed
15 unmodified lines
1617Declarative18-----------1920The default behaviour of MongoKit is the declarative one that is based on20The default behavior of MongoKit is the declarative one that is based on21common ideas from Django or the SQLAlchemy declarative extension.2223Here an example `app.py` module for your application::24
120 unmodified lines
modified:docs/design.rst+1 added-1 removed
46 unmodified lines
47allocated will be freed again.4849Another thing that becomes possible when you have an explicit object lying50around in your code is that you can subclass the base class51(:class:`~flask.Flask`) to alter specific behaviour. This would not be51(:class:`~flask.Flask`) to alter specific behavior. This would not be52possible without hacks if the object were created ahead of time for you53based on a class that is not exposed to you.5455But there is another very important reason why Flask depends on an
136 unmodified lines
modified:docs/extensiondev.rst+2 added-2 removed
38 unmodified lines
39that it works with multiple Flask application instances at once. This is40a requirement because many people will use patterns like the41:ref:`app-factories` pattern to create their application as needed to aid42unittests and to support multiple configurations. Because of that it is43crucial that your application supports that kind of behaviour.43crucial that your application supports that kind of behavior.4445Most importantly the extension must be shipped with a `setup.py` file and46registered on PyPI. Also the development checkout link should work so47that people can easily install the development version into their
96 unmodified lines
144145classes:146147 Classes work mostly like initialization functions but can later be148 used to further change the behaviour. For an example look at how the148 used to further change the behavior. For an example look at how the149 `OAuth extension`_ works: there is an `OAuth` object that provides150 some helper functions like `OAuth.remote_app` to create a reference to151 a remote application that uses OAuth.152
269 unmodified lines
modified:docs/htmlfaq.rst+1 added-1 removed
50 unmodified lines
51Development of the HTML5 specification was started in 2004 under the name52"Web Applications 1.0" by the Web Hypertext Application Technology Working53Group, or WHATWG (which was formed by the major browser vendors Apple,54Mozilla, and Opera) with the goal of writing a new and improved HTML55specification, based on existing browser behaviour instead of unrealistic55specification, based on existing browser behavior instead of unrealistic56and backwards-incompatible specifications.5758For example, in HTML4 ``<title/Hello/`` theoretically parses exactly the59same as ``<title>Hello</title>``. However, since people were using
148 unmodified lines
modified:docs/quickstart.rst+1 added-1 removed
164 unmodified lines
165`float` like `int` but for floating point values166`path` like the default but also accepts slashes167=========== ===========================================168169.. admonition:: Unique URLs / Redirection Behaviour169.. admonition:: Unique URLs / Redirection Behavior170171 Flask's URL rules are based on Werkzeug's routing module. The idea172 behind that module is to ensure beautiful and unique URLs based on173 precedents laid down by Apache and earlier HTTP servers.
680 unmodified lines
modified:docs/templating.rst+1 added-1 removed
61 unmodified lines
62 :noindex:6364 The :func:`flask.get_flashed_messages` function.6566.. admonition:: The Jinja Context Behaviour66.. admonition:: The Jinja Context Behavior6768 These variables are added to the context of variables, they are not69 global variables. The difference is that by default these will not70 show up in the context of imported templates. This is partially caused
145 unmodified lines
modified:flask/app.py+1 added-1 removed
1358 unmodified lines
13591360 def make_default_options_response(self):1361 """This method is called to create the default `OPTIONS` response.1362 This can be changed through subclassing to change the default1363 behaviour of `OPTIONS` responses.1363 behavior of `OPTIONS` responses.13641365 .. versionadded:: 0.71366 """1367 adapter = _request_ctx_stack.top.url_adapter
293 unmodified lines
modified:flask/helpers.py+5 added-5 removed
58 unmodified lines
59 if not json_available:60 raise RuntimeError('simplejson not installed')616263# figure out if simplejson escapes slashes. This behaviour was changed63# figure out if simplejson escapes slashes. This behavior was changed64# from one version to another without reason.65if not json_available or '\\/' not in json.dumps('/'):6667 def _tojson_filter(*args, **kwargs):
52 unmodified lines
120 .. versionadded:: 0.2121122 .. versionadded:: 0.9123 If the ``padded`` argument is true, the JSON object will be padded124 for JSONP calls and the response mimetype will be changed to 124 for JSONP calls and the response mimetype will be changed to125 ``application/javascript``. By default, the request arguments ``callback``126 and ``jsonp`` will be used as the name for the callback function.127 This will work with jQuery and most other JavaScript libraries128 by default.
257 unmodified lines
386 .. versionadded:: 0.2387388 .. versionadded:: 0.5389 The `add_etags`, `cache_timeout` and `conditional` parameters were390 added. The default behaviour is now to attach etags.390 added. The default behavior is now to attach etags.391392 .. versionchanged:: 0.7393 mimetype guessing and etag support for file objects was394 deprecated because it was unreliable. Pass a filename if you are
26 unmodified lines
421 from warnings import warn422 file = filename_or_fp423 filename = getattr(file, 'name', None)424425 # XXX: this behaviour is now deprecated because it was unreliable.425 # XXX: this behavior is now deprecated because it was unreliable.426 # removed in Flask 1.0427 if not attachment_filename and not mimetype \428 and isinstance(filename, basestring):429 warn(DeprecationWarning('The filename support for file objects '
2 unmodified lines
432 stacklevel=2)433 if add_etags:434 warn(DeprecationWarning('In future flask releases etags will no '435 'longer be generated for file objects passed to the send_file '436 'function because this behaviour was unreliable. Pass '436 'function because this behavior was unreliable. Pass '437 'filenames instead if possible, otherwise attach an etag '438 'yourself based on another value'), stacklevel=2)439440 if filename is not None:
328 unmodified lines
modified:CHANGES+4 added-4 removed
151 unmodified lines
152Released on June 28th 2011, codename Grappa153154- Added :meth:`~flask.Flask.make_default_options_response`155 which can be used by subclasses to alter the default156 behaviour for `OPTIONS` responses.156 behavior for `OPTIONS` responses.157- Unbound locals now raise a proper :exc:`RuntimeError` instead158 of an :exc:`AttributeError`.159- Mimetype guessing and etag support based on file objects is now160 deprecated for :func:`flask.send_file` because it was unreliable.
1 unmodified line
162 proper mimetype by hand.163- Static file handling for modules now requires the name of the164 static folder to be supplied explicitly. The previous autodetection165 was not reliable and caused issues on Google's App Engine. Until166 1.0 the old behaviour will continue to work but issue dependency166 1.0 the old behavior will continue to work but issue dependency167 warnings.168- fixed a problem for Flask to run on jython.169- added a `PROPAGATE_EXCEPTIONS` configuration variable that can be170 used to flip the setting of exception propagation which previously
109 unmodified lines
280 the `SERVER_NAME` config key. This key is now also used to set281 the session cookie cross-subdomain wide.282- autoescaping is no longer active for all templates. Instead it283 is only active for ``.html``, ``.htm``, ``.xml`` and ``.xhtml``.284 Inside templates this behaviour can be changed with the284 Inside templates this behavior can be changed with the285 ``autoescape`` tag.286- refactored Flask internally. It now consists of more than a287 single file.288- :func:`flask.send_file` now emits etags and has the ability to289 do conditional responses builtin.290- (temporarily) dropped support for zipped applications. This was a291 rarely used feature and led to some confusing behaviour.291 rarely used feature and led to some confusing behavior.292- added support for per-package template and static-file directories.293- removed support for `create_jinja_loader` which is no longer used294 in 0.5 due to the improved module support.295- added a helper function to expose files from any directory.
70 unmodified lines