On Jul 1, 5:51 pm, Jean-Guy <jean...@gmail.com> wrote:
> Hello,
>
> I am having difficulties to understand something about web2py...
>
> Can we make other folders (different of the default folder) for storing
> our models, controllers and views or should we most put everything in
> default folder?

not sure what you mean here ....   views/default   holds views for
controller/default.py  functions .... that's just the way web2py is
set up.

A picture is worth 1000 words -
Have a look at http://web2py.com/book/default/section/4/2

all the files in your_application/models  are "read" (in your
environment) for each request that comes in;
in the middle box in the picture (above)
==>  "call  function() in controller.py"

is selected from your_application/controller/controller.py

in the right box in the picture (above)
==> "rendered by controller/function.html"

means that web2py renders   from your_application/views/controller/
function.html

"last folder you were in"  - what does this mean?
(remember:  web requests are stateless, except for what you store in
session cookies)

.... hope this helps a little,
- Yarko

>
> I mean if I create other folders and I put my stuff in in when I make a
> redirect with URL(r=request, f='index') it will go to
> /app/last_folder_I_were_in/index
>
> If i want a unique index what should i do?
>
> Jonhy

Reply via email to