mirror of https://github.com/pallets/flask.git
0.5 is 0.3 now, why skip numbers?
This commit is contained in:
parent
dfecc86dd3
commit
ce6e4cbd73
2
CHANGES
2
CHANGES
|
@ -3,7 +3,7 @@ Flask Changelog
|
|||
|
||||
Here you can see the full list of changes between each Flask release.
|
||||
|
||||
Version 0.5
|
||||
Version 0.3
|
||||
-----------
|
||||
|
||||
Release date to be announced
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Configuration Handling
|
||||
======================
|
||||
|
||||
.. versionadded:: 0.5
|
||||
.. versionadded:: 0.3
|
||||
|
||||
Applications need some kind of configuration. There are different things
|
||||
you might want to change. Like toggling debug mode, the secret key and a
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Handling Application Errors
|
||||
===========================
|
||||
|
||||
.. versionadded:: 0.5
|
||||
.. versionadded:: 0.3
|
||||
|
||||
Applications fail, server fail. Sooner or later you will see an exception
|
||||
in production. Even if your code is 100% correct, you will still see
|
||||
|
|
|
@ -86,7 +86,7 @@ And of course the login template:
|
|||
Flashing With Categories
|
||||
------------------------
|
||||
|
||||
.. versionadded:: 0.5
|
||||
.. versionadded:: 0.3
|
||||
|
||||
It is also possible to provide categories when flashing a message. The
|
||||
default category if nothing is provided is ``'message'``. Alternative
|
||||
|
|
|
@ -691,7 +691,7 @@ for a full example.
|
|||
Logging
|
||||
-------
|
||||
|
||||
.. versionadded:: 0.5
|
||||
.. versionadded:: 0.3
|
||||
|
||||
Sometimes you might be in the situation where you deal with data that
|
||||
should be correct, but actually is not. For example you have some client
|
||||
|
@ -702,7 +702,7 @@ Request`` in that situation, but other times it is not and the code has to
|
|||
continue working.
|
||||
|
||||
Yet you want to log that something fishy happened. This is where loggers
|
||||
come in handy. As of Flask 0.5 a logger is preconfigured for you to use.
|
||||
come in handy. As of Flask 0.3 a logger is preconfigured for you to use.
|
||||
|
||||
Here are some example log calls::
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Working with the Shell
|
||||
======================
|
||||
|
||||
.. versionadded:: 0.5
|
||||
.. versionadded:: 0.3
|
||||
|
||||
One of the reasons everybody loves Python is the interactive shell. It
|
||||
basically allows you to execute Python commands in real time and
|
||||
|
|
|
@ -14,10 +14,10 @@ This section of the documentation enumerates all the changes in Flask from
|
|||
release to release and how you can change your code to have a painless
|
||||
updating experience.
|
||||
|
||||
Version 0.5
|
||||
Version 0.3
|
||||
-----------
|
||||
|
||||
Flask 0.5 introduces configuration support and logging as well as
|
||||
Flask 0.3 introduces configuration support and logging as well as
|
||||
categories for flashing messages. All these are features that are 100%
|
||||
backwards compatible but you might want to take advantage of them.
|
||||
|
||||
|
|
14
flask.py
14
flask.py
|
@ -232,7 +232,7 @@ def flash(message, category='message'):
|
|||
flashed message from the session and to display it to the user,
|
||||
the template has to call :func:`get_flashed_messages`.
|
||||
|
||||
.. versionchanged: 0.5
|
||||
.. versionchanged: 0.3
|
||||
`category` parameter added.
|
||||
|
||||
:param message: the message to be flashed.
|
||||
|
@ -260,7 +260,7 @@ def get_flashed_messages(with_categories=False):
|
|||
<p class=flash-{{ category }}>{{ msg }}
|
||||
{% endfor %}
|
||||
|
||||
.. versionchanged:: 0.5
|
||||
.. versionchanged:: 0.3
|
||||
`with_categories` parameter added.
|
||||
|
||||
:param with_categories: set to `True` to also receive categories.
|
||||
|
@ -829,7 +829,7 @@ class Flask(_PackageBoundObject):
|
|||
#: the application is in debug mode, otherwise the attached logging
|
||||
#: handler does the formatting.
|
||||
#:
|
||||
#: .. versionadded:: 0.5
|
||||
#: .. versionadded:: 0.3
|
||||
debug_log_format = (
|
||||
'-' * 80 + '\n' +
|
||||
'%(levelname)s in %(module)s, %(pathname)s:%(lineno)d]:\n' +
|
||||
|
@ -949,7 +949,7 @@ class Flask(_PackageBoundObject):
|
|||
app.logger.warning('A warning ocurred (%d apples)', 42)
|
||||
app.logger.error('An error occoured')
|
||||
|
||||
.. versionadded:: 0.5
|
||||
.. versionadded:: 0.3
|
||||
"""
|
||||
from logging import getLogger, StreamHandler, Formatter, DEBUG
|
||||
class DebugHandler(StreamHandler):
|
||||
|
@ -1225,7 +1225,7 @@ class Flask(_PackageBoundObject):
|
|||
registered error handlers and fall back to returning the
|
||||
exception as response.
|
||||
|
||||
.. versionadded: 0.5
|
||||
.. versionadded: 0.3
|
||||
"""
|
||||
handler = self.error_handlers.get(e.code)
|
||||
if handler is None:
|
||||
|
@ -1239,7 +1239,7 @@ class Flask(_PackageBoundObject):
|
|||
for an 500 internal server error is used. If no such handler
|
||||
exists, a default 500 internal server error message is displayed.
|
||||
|
||||
.. versionadded: 0.5
|
||||
.. versionadded: 0.3
|
||||
"""
|
||||
handler = self.error_handlers.get(500)
|
||||
if self.debug:
|
||||
|
@ -1397,7 +1397,7 @@ class Flask(_PackageBoundObject):
|
|||
u'/'
|
||||
>>> ctx.unbind()
|
||||
|
||||
.. versionchanged:: 0.5
|
||||
.. versionchanged:: 0.3
|
||||
Added support for non-with statement usage and `with` statement
|
||||
is now passed the ctx object.
|
||||
|
||||
|
|
Loading…
Reference in New Issue