Hi, Yes I have such directory. I can access myapp, but I'm forced to put all my functions inside DEFAULT.PY controller. I was wishing to split my functions across differente controllers, and I just can't understand why I can't.
I'm using nginx, with this config : server { listen 80; server_name $hostname; location ~* /(\w+)/static/ { root /home/www-data/web2py/applications/; } location / { uwsgi_pass 127.0.0.1:9001; include uwsgi_params; uwsgi_param UWSGI_SCHEME $scheme; uwsgi_param SERVER_SOFTWARE nginx/$nginx_version; } } server { listen 443; client_max_body_size 20M; server_name $hostname; ssl on; ssl_certificate /etc/nginx/ssl/web2py.crt; ssl_certificate_key /etc/nginx/ssl/web2py.key; location / { uwsgi_pass 127.0.0.1:9001; include uwsgi_params; uwsgi_param UWSGI_SCHEME $scheme; uwsgi_param SERVER_SOFTWARE nginx/$nginx_version; } }' This is a standard config i grabbed from some recipe, since I'm an absolute beginner when it comes to http servers. Do you think something is wrong there ? On Tuesday, October 16, 2012 4:12:16 PM UTC+1, Jonathan Lundell wrote: > > On 16 Oct 2012, at 2:27 AM, apinho <jaap...@sapo.pt <javascript:>> wrote: > > Using web2py, straight out of the box, no routes.py or such : > > When i request : > https > <https://myserver/myapp/mycontroller/myfunction>:<https://myserver/myapp/mycontroller/myfunction> > //myserver/myapp/mycontroller/myfunction<https://myserver/myapp/mycontroller/myfunction> > > having /models/models.py : > ... > default_application = 'myapp' > ... > > > > and /controllers/mycontroller.py : > def myfunction(): > # no pasa nada > return dict() > > Web2py answers : > invalid function (default/mycontroller) > > So, he is looking for function *mycontroller*, inside controller * > default.py*, instead of looking for function *myfunction*, inside > controller*mycontroller.py*. > > Why ? What I am missing ? > > > > You can't set the default application in your model. It's too late; the > routing is already done. > > But you should still be able to access myapp explicitly. Do you have a > directory: applications/myapp with the above models and controller in it? > --