Re: [web2py] Re: Session lost in decorator....

2011-04-07 Thread Anthony
Sorry, this should work (well, it does when I try it): def is_in_conference(f): ''' INFO: Special decorator to validate that they are attending a conference. ''' def g(f=f): if not session.current_conference: redirect(URL('default', 'index')) re

Re: [web2py] Re: Session lost in decorator....

2011-04-07 Thread Jason (spot) Brower
OK it was solved... it was a problem with the decorators... sorry... I did this... def is_in_conference(f): ''' INFO: Special decorator to validate that they are attending a conference. ''' def validation(): if not session.current_conference: print "In the method

Re: [web2py] Re: Session lost in decorator....

2011-04-07 Thread Jason (spot) Brower
Yup... if I put the decorator somewhere on some other method than index it still kicks me out. WEIRD! On Thu, Apr 7, 2011 at 8:23 PM, Jason (spot) Brower wrote: > By the looks of it... It seems that those decorators are run even when the > method is not called. There by redirecting me before I

Re: [web2py] Re: Session lost in decorator....

2011-04-07 Thread Jason (spot) Brower
By the looks of it... It seems that those decorators are run even when the method is not called. There by redirecting me before I can get to the enter conference method. I will be in the IRC tonight for a while if you have time to hop on and help out. BR, Jason Brower On Thu, Apr 7, 2011 at 8:09

Re: [web2py] Re: Session lost in decorator....

2011-04-07 Thread Jason (spot) Brower
When I put print f right at the beginngin of is_in_conference function I get the following: representation each method I have decorated. BR, Jason On Thu, Apr 7, 2011 at 8:05 PM, Jason (spot) Brower wrote: > That still returns none Sadly... > > > On Wed, Apr 6, 2011 at 11:46 PM, Anthony

Re: [web2py] Re: Session lost in decorator....

2011-04-07 Thread Jason (spot) Brower
That still returns none Sadly... On Wed, Apr 6, 2011 at 11:46 PM, Anthony wrote: > Try > > def is_in_conference(f): > ''' > INFO: Special decorator to validate that they are attending a > conference. > ''' > def g(f=f): > if not session.current_conference: >

Re: [web2py] Re: Session lost in decorator....

2011-04-06 Thread Anthony
Try def is_in_conference(f): ''' INFO: Special decorator to validate that they are attending a conference. ''' def g(f=f): if not session.current_conference: redirect(URL('default', 'index')) f() return g On Wednesday, April 6, 2011 3:45:57

Re: [web2py] Re: Session lost in decorator....

2011-04-06 Thread Jason Brower
Now all page controllers with the decorator return None on the screen. --- Jason On 04/06/2011 09:34 PM, Massimo Di Pierro wrote: should be def is_in_conference(f): ''' INFO: Special decorator to validate that they are attending a conference. ''' def g(f=f): i

[web2py] Re: Session lost in decorator....

2011-04-06 Thread Massimo Di Pierro
should be def is_in_conference(f): ''' INFO: Special decorator to validate that they are attending a conference. ''' def g(f=f): if not session.current_conference: redirect(URL('default', 'index')) return g On Apr 6, 12:18 pm, Jason Brower wrote: