diff options
| -rw-r--r-- | pyramid/security.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pyramid/security.py b/pyramid/security.py index 011545939..f993ef353 100644 --- a/pyramid/security.py +++ b/pyramid/security.py @@ -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. |
