[Tutor] automatically add it to all the classes

anil maran anilmrn at yahoo.com
Mon Oct 30 04:59:11 CET 2006


 All the classes in my webpy application have the following lines 
 is there anyway to automatically add it to all the classes in code.py, 
 user.py 
 If it is too basic, please pardon my naivette. 
 thanks 
 John 
 These are the lines shared by all classes, 
    @checkaccess(auth=True) 
 
        sess = web.ctx.environ['com.saddi.service.session'].session 
         meta_desc = 'myMetaData' 
         title = 'title' 
         session=web.cookies() 
 
in a class 
 class index: 
    @checkaccess(auth=True) 
    def GET(self): 
         sess = web.ctx.environ['com.saddi.service.session'].session 
         meta_desc = 'myMetaData' 
         title = 'title' 
         session=web.cookies() 


Anil
 
---------------------------------
We have the perfect Group for you. Check out the handy changes to Yahoo! Groups.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061029/2c0c7644/attachment.html 


More information about the Tutor mailing list