Are you expecting the print on shell right? there are no message printed to
console?

Are you using mod_wsgi or running on rocket server? (mod_wsgi does not works
well with stdout(print))

If, do you expect the output in to browser, it is better to use a specific
view for handle the message or raise a web2py exception with a custom
message.





On Fri, Jun 10, 2011 at 4:31 AM, anil manikyam <anilmanikya...@gmail.com>wrote:

> def login():
>    if db((db.table1.username)== request.vars.visitor_name).select():
>        redirect(URL('index'))
>    else:
>        print 'invalid statement'
>    return dict()
>
>
> in this username and visitor_name are compared if correct redirect to
> index page it is work very well
>
> but if those are not equal else part is not printed why?
>
> i want code for this

Reply via email to