Yes. Sorry for the delay. Perfect solution. 

Le dimanche 26 avril 2015 00:47:23 UTC+2, Anthony a écrit :
>
> Did this solution <http://stackoverflow.com/a/29799597/440323> not work 
> for you?
>
> On Saturday, April 25, 2015 at 11:28:10 AM UTC-4, Christophe Meessen wrote:
>>
>> In my web2py web app, the controller function def index(): has the 
>> decorator @auth.requires_login(). 
>>
>> For development and testing purpose I comment out this decorator. But I 
>> often forget to uncomment it before committing the code. 
>>
>> I would like to change this decorator into something that would test if a 
>> file is present (i.e. skipLogin) and if not to require login. I can then 
>> add the skipLogin file in my .gitignore file and don't need to worry about 
>> commenting and uncommenting the decorator line. 
>>
>> I suppose it should be something like @auth.requires(lambda: xxx) but I 
>> have no idea what xxx should be. 
>>
>>

-- 
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.

Reply via email to