From 8f2b63876e96e0c957606306ed977c40a1388322 Mon Sep 17 00:00:00 2001 From: Mark McClain Date: Sun, 6 Mar 2011 22:40:41 -0500 Subject: tweak example --- docs/source/secure_controller.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs/source/secure_controller.rst') diff --git a/docs/source/secure_controller.rst b/docs/source/secure_controller.rst index b768805..065e682 100644 --- a/docs/source/secure_controller.rst +++ b/docs/source/secure_controller.rst @@ -113,10 +113,11 @@ First, you can pass via a string the name of either a classmethod or an instanc from pecan.secure import secure from myapp.session import get_current_user + from myapp.model import FileObject class FileController(object): - def __init__(self, file_object): - self.file_object = file_object + def __init__(self, name): + self.file_object = FileObject(name) def read_access(self): self.file_object.read_access(get_current_user()) -- cgit v1.2.1