[web2py] Where should I put my application logic code?

2013-12-31 Thread Wei Li
Hi, This could be a silly question:) . I am going to build up some application logic. So I will create a few class and functions. Looks like it's not very good to put these code under controllers. Although from the manual, it says controller folder is for application logic and workflow. See if

Re: [web2py] Re: Where should I put my application logic code?

2013-12-31 Thread Wei Li
Thank you all for the replies! On Tue, Dec 31, 2013 at 1:10 PM, Phil Hughes nica...@gmail.com wrote: Add an argument to the function: foo(bar): Only functions with no arguments can be called from the outside world. On Tuesday, December 31, 2013 3:57:56 AM UTC-6, Wei Li wrote: Hi

[web2py] always get This webpage has a redirect loop if use google oauth2

2013-12-30 Thread Wei Li
I am trying to make a tiny example to login my app via google oauth2. However, I always got This webpage has a redirect loop error from the browser if I use @auth.requires_login() pragma. Model Code: from gluon.contrib.login_methods.oauth20_account import OAuthAccount

[web2py] remote admin

2013-05-22 Thread Wei Li
It's really annoying. For developing stage, there is no reason to be so secure. The easiest way: modifying models/access.py seems doesn't work for me. My web2py is redirectly to apache. Using SSL will involve lot of configs Have to keep hacking web2py's source code now. -- --- You

Re: [web2py] Re: remote admin

2013-05-22 Thread Wei Li
using Putty. You do not need a ssl certificate to make a tunnel. Massimo On Wednesday, 22 May 2013 18:35:47 UTC-5, Wei Li wrote: It's really annoying. For developing stage, there is no reason to be so secure. The easiest way: modifying models/access.py seems doesn't work for me. My

Re: [web2py] Re: remote admin

2013-05-22 Thread Wei Li
to loalhost using Putty. You do not need a ssl certificate to make a tunnel. Massimo On Wednesday, 22 May 2013 18:35:47 UTC-5, Wei Li wrote: It's really annoying. For developing stage, there is no reason to be so secure. The easiest way: modifying models/access.py seems doesn't work for me. My

[web2py] Re: How can I use an alternate(non-root) directory in a production deployment?

2013-05-22 Thread Wei Li
I have the same question On Thursday, January 12, 2012 12:42:17 PM UTC-8, tomt wrote: I followed the manual's instruction for deploying web2py in a production environment using apache and wsgi, and it works as advertised. Calling http://domain.com/app1/default/function works just like

[web2py] got invalid view (default/hello.html) if I access the URL from another machine

2012-03-01 Thread Wei Li
Hi, I just setup a web2py application. Everything is ok except one thing: if I access the URL from another machine which is not the web2py server is running, then the function I wrote in controllers/default.py won't be converted to a view. It gives an errro about invalide view. Here is the