diff options
author | Mark McClain <mark.mcclain@shootq.com> | 2011-03-06 22:40:41 -0500 |
---|---|---|
committer | Mark McClain <mark.mcclain@shootq.com> | 2011-03-06 22:40:41 -0500 |
commit | 8f2b63876e96e0c957606306ed977c40a1388322 (patch) | |
tree | d70954668292e22502b0f3ff4b57944c24fcb0db /docs/source/secure_controller.rst | |
parent | b3cde8dbe00523413963a1f350b3851b7b643b29 (diff) | |
download | pecan-8f2b63876e96e0c957606306ed977c40a1388322.tar.gz |
tweak example
Diffstat (limited to 'docs/source/secure_controller.rst')
-rw-r--r-- | docs/source/secure_controller.rst | 5 |
1 files changed, 3 insertions, 2 deletions
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()) |