Hi

I am trying to use a decorator to restrict access to my classes
@auth.protected()

I have organised my files as
auth
 - dbauth.py
 - session.py
web
code.py
tabs.py

I create the auth object in my code.py and save it in web.config._auth
I use it in tabs.py

The problem is when I import tabs in code.py it tries to access this
attribute from web.config._auth which is to be set in the main code.py
file.

How such a situation handled? I tried studing the code at
https://github.com/alexksikes/MLSS/blob/master/application.py

Note that the application imports app.controllers and creates the
session at the end of the file.
However the session.is_logged uses the get_session() even before the
main application.py creates the session.


Anything that i have been missing

Cheers
PK

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to webpy@googlegroups.com.
To unsubscribe from this group, send email to 
webpy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to