Skip to content

Commit

Permalink
add code-block to p.security.forget
Browse files Browse the repository at this point in the history
  • Loading branch information
mmerickel committed Feb 2, 2015
1 parent 06ecaf5 commit 620bdef
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pyramid/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,14 @@ def forget(request):
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.
Expand Down

0 comments on commit 620bdef

Please sign in to comment.