PERMANENT_SESSION_LIFETIME can now be an integer. This fixes #310

This commit is contained in:
Armin Ronacher 2011-09-25 19:12:41 +02:00
parent 6d0b3264c2
commit 6dccf77546
3 changed files with 35 additions and 9 deletions

View file

@ -217,6 +217,13 @@ implementation that Flask is using.
.. autoclass:: SessionMixin
:members:
.. admonition:: Notice
The ``PERMANENT_SESSION_LIFETIME`` config key can also be an integer
starting with Flask 0.8. Either catch this down yourself or use
the :attr:`~flask.Flask.permanent_session_lifetime` attribute on the
app which converts the result to an integer automatically.
Test Client
-----------

View file

@ -86,6 +86,8 @@ The following configuration values are used internally by Flask:
`False`.
``PERMANENT_SESSION_LIFETIME`` the lifetime of a permanent session as
:class:`datetime.timedelta` object.
Starting with Flask 0.8 this can also be
an integer representing seconds.
``USE_X_SENDFILE`` enable/disable x-sendfile
``LOGGER_NAME`` the name of the logger
``SERVER_NAME`` the name and port number of the server.