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
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
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
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
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
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:
>
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
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
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:
9 matches
Mail list logo