diff options
| author | Michael Merickel <michael@merickel.org> | 2015-02-02 14:17:31 -0600 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2015-02-02 14:17:46 -0600 |
| commit | 620bdefbff81792fd047f273a234264ce3d0a764 (patch) | |
| tree | 413abd613bceb61d3108d00733d5d536c9970a75 | |
| parent | 06ecaf50d7a66a624761043ce950ab32d3e883a9 (diff) | |
| download | pyramid-620bdefbff81792fd047f273a234264ce3d0a764.tar.gz pyramid-620bdefbff81792fd047f273a234264ce3d0a764.tar.bz2 pyramid-620bdefbff81792fd047f273a234264ce3d0a764.zip | |
add code-block to p.security.forget
| -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. |
