My app has been ok with these code;
In controller:
@auth.requires_login()
def notes():
dbhealth.health.id.readable = False
g = SQLFORM.grid(dbhealth.health, searchable=True, csv=False,
user_signature=True, )
return dict(form = g)........code
question = db(db.answers.author ==
auth.user.id).select(orderby=~db.answers.created_on,limitby=(2,0))
return dict(form=form, question=question)
In view:
{{for q in question:}}
{{q=XML(q.quest.replace('\n','<br>').replace('(','{').replace(')','}'),
sanitize=True)}}
{{pass}}
when I changed the login credentials to membership requirement as follows:
@auth.requires_membership('managers')
def notes():
I got this error on trying to use the app:
<type 'exceptions.NameError'> name 'q' is not defined
what could be the issue? and how can i solve it?
I hope i have given all the details needed
Kind regards
--
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].
For more options, visit https://groups.google.com/d/optout.