Steve Piercy
2015-05-31 20729813d02529f24fbb639f91b423416e8d040c
Merge pull request #1821 from stevepiercy/1.6-branch

backporting CSRF
1 files modified
9 ■■■■■ changed files
docs/narr/sessions.rst 9 ●●●●● patch | view | raw | blame | history
docs/narr/sessions.rst
@@ -56,7 +56,7 @@
   config = Configurator()
   config.set_session_factory(my_session_factory)
.. warning::
.. warning::
   By default the :func:`~pyramid.session.SignedCookieSessionFactory`
   implementation is *unencrypted*.  You should not use it
@@ -112,7 +112,7 @@
  An integer timestamp indicating the time that this session was created.
``new``
  A boolean.  If ``new`` is True, this session is new.  Otherwise, it has
  A boolean.  If ``new`` is True, this session is new.  Otherwise, it has
  been constituted from data that was already serialized.
Extra methods:
@@ -225,7 +225,7 @@
   request.session.flash('mymessage')
The ``flash()`` method appends a message to a flash queue, creating the queue
if necessary.
if necessary.
``flash()`` accepts three arguments:
@@ -406,7 +406,7 @@
A convenient way to require a valid CSRF Token for a particular view is to
include ``check_csrf=True`` as a view predicate.
See :meth:`pyramid.config.Configurator.add_route`.
See :meth:`pyramid.config.Configurator.add_view`.
.. code-block:: python
@@ -432,5 +432,4 @@
.. code-block:: python
   token = request.session.new_csrf_token()