Thank you. What is argument (fun)? Is it my functions swed() and docs()? If
I do like that I have error that emailConfirmed() takes exactly 1 argument
(0 given):
def emailConfirmed(fun):
def decorated():
if session.abit_email is None:
redirect(URL('default','index'))
else:
confirmed = db_xml((db_xml.abit_validation_codes.A_EMAIL==sess
ion.abit_email) & (db_xml.abit_validation_codes.CONFIRMED==1)).select().
first()
if confirmed is None:
redirect(URL('default','index'))
else:
return fun()
return decorated
@emailConfirmed()
def swed():
#code
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/1906a393-daa6-48cd-b846-68bee6dcb957%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.