Michael Merickel
2015-02-02 3d7c2bddee4deca9c84f2ee30fc27bd5a4bccc0f
add code-block to p.security.forget
1 files modified
12 ■■■■■ changed files
pyramid/security.py 12 ●●●●● patch | view | raw | blame | history
pyramid/security.py
@@ -151,12 +151,14 @@
    possessed by the currently authenticated user.  A common usage
    might look like so within the body of a view function
    (``response`` is assumed to be an :term:`WebOb` -style
    :term:`response` object computed previously by the view code)::
    :term:`response` object computed previously by the view code):
      from pyramid.security import forget
      headers = forget(request)
      response.headerlist.extend(headers)
      return response
    .. code-block:: python
       from pyramid.security import forget
       headers = forget(request)
       response.headerlist.extend(headers)
       return response
    If no :term:`authentication policy` is in use, this function will
    always return an empty sequence.