From 620bdefbff81792fd047f273a234264ce3d0a764 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 2 Feb 2015 14:17:31 -0600 Subject: add code-block to p.security.forget --- pyramid/security.py | 12 +++++++----- 1 file 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. -- cgit v1.2.3