Not necessarily. I am just wondering if it is possible to have a
controller within a sub-folder of the "Controllers" folder. like "app/
Controllers/user/register/newuser" where "user" is a sub folder, and
"register" is the controller.

I can't come up with any specific example of why I need this, though I
still want to know if it's possible. Right now I am going to achieve
the same intent just by importing the functions from the "register"
controller into another controller in the "Controllers" folder. I
think that should be the way to do it anyway, as the current web2py
app/controller/function/arg setup is clear, simple, and very workable.



On Apr 5, 2:11 pm, mdipierro <[email protected]> wrote:
> Just so that I inderstand. Instead of having controller files (like
> default.py), you want to have controller folders, so that each action
> is its own file?
>
> Massimo
>
> On Apr 5, 4:04 pm, waTR <[email protected]> wrote:
>
> > Well, it is just a question as to whether this is possible. I was
> > hoping to organize my project files via folders rather than simply
> > controllers/functions. However, I realized I can achieve the same
> > general effect via linking functions held within controller/sub-folder/
> > functions by importing them in controller/linker-controller.
>
> > However, I was curious as it doesn't seem sub-folders are possible so
> > far, and I was just wondering if someone was willing to play the
> > devils advocate and just ask the question. I find it rather more
> > productive to ask the question and ensure there is definetly a way to
> > achieve the INTENT of project file organization with web2py via
> > linking (which is actually completely fine).
>
> > I just thought it might be interesting to have a controller and sub-
> > folder tree that mirrors a website folder tree. I am just really not a
> > fan of having 100 files in a single directory, and was hoping to keep
> > it down to like 10 or less files per folder.
>
> > Any suggestions as to some good practice for file management in web2py
> > (file/folder make-up/organization)?
>
> > My idea right now (based on what web2py can do), is have linker
> > controllers under the "Controllers" folder, and have a bunch of sub-
> > folders in the "Controllers" folder which will contain all the actual
> > functions and business-logic.
>
> > Any other ideas/suggestions?
>
> > On Apr 5, 5:35 am, Vidul Petrov <[email protected]> wrote:
>
> > > > it is such an important feature for organizing a large project...
>
> > > Because?
>
> > > The controller itself provides a namespace, not the filesystem.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to