[Chicago] CherryPy decorators question
Daniel Griffin
dgriff1 at gmail.com
Fri Feb 27 17:35:04 CET 2009
Hi,
I am a bit confused about decorators in cherrypy and was hoping someone
could help me. I am trying to add a decorator to some pages to deal with
security stuff but when I add them I break the decorators that expose the
methods. I think im doing something wrong syntactically.
def auth(func):
print "some stuff"
class .....
@auth
def index(self):
return some template
index.exposed = True
Python complains that one or the other is broken and im pretty confused
about why there seems to be 2 different syntaxes.
Thanks,
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20090227/80043e06/attachment.htm>
More information about the Chicago
mailing list