Thanks.  The "folder" option in options.py seems like a decent solution for 
the moment.  However, if I understand right, it would still require me to 
move the existing applications (like admin) along with my own apps.

Have you considered adding a feature to web2py to allow the directory for 
each application to be specified individually, rather than having them all 
under a single global applications directory?  For instance, why couldn't 
the "folder" option you mentioned instead be a list of folders?

On Wednesday, January 27, 2016 at 3:20:58 PM UTC-8, Massimo Di Pierro wrote:
>
> Hello Brendan, there is not one solution to this problem. What is 
> important is that there is one one web2py folder and one applications 
> (plural) folder. Normally the latter is under the former but it does not 
> have to be. Each application you run must be a subfolder of that one 
> applications folder.
>
> This is because unlike Flask and other frameworks where the application is 
> the entry point and it imports the modules you need and therefore you run 
> one server per each application, in web2py, web2py is the entry point. You 
> run one server which serves all your applications. It also runs the web 
> based IDE (unless you remove it) and that needs to know where to put 
> applications uploaded via the web interface.
>
> So the two options are (not exclusive)
>
> 1) move the applications folder outside the web2py folder (this is cone by 
> copying web2py/examples/options_std.py into web2py/options.py, edit it, and 
> set folder = to the location where to find applications)
> 2) move an individual app outside the applications folder (this require 
> that you symlink it under the applications folder)
>
> Massimo
>
>
>  
>
> On Wednesday, 27 January 2016 17:05:57 UTC-6, Brendan Barnwell wrote:
>>
>> I've recently begun looking at web2py.  It looks very nice.  However, one 
>> thing that seems strange to me is that it is apparently not set up to be 
>> installed.  Rather, to "install" it you just copy the web2py files (or 
>> clone the repo) into a directory.  That install then "knows" about all the 
>> applications stored under its directory tree.
>>
>> This seems like a rather odd setup.  With this setup, my application is 
>> stored under the web2py directory tree.  But I want to put my application 
>> code in its own directory --- in particular, in its own repository.  My 
>> application's code should be handled separately from the code of web2py 
>> itself.
>>
>> Also, it's not clear to me how I would then deploy my application without 
>> also "installing" web2py separately for each app.  So, if I want to copy 
>> some files to my web server to run an app, I would expect to install web2py 
>> ONCE to the server, and then set up my app to use the existing web2py 
>> installation.  But with the way it's actually set up, it appears I would 
>> have to install separate copies of web2py for each app, which seems rather 
>> wasteful.
>>
>> I found an old post (
>> https://groups.google.com/forum/#!topic/web2py/3FWZCmLzhzc) where 
>> someone talks about handling this by symlinking from the web2py directory 
>> to the "real" app directory.  Is this really the way you have to do it?  
>> Isn't there a way to take JUST my own application code, and tell it where 
>> to find web2py (or tell web2py where to find my app), and then get web2py 
>> to run my app regardless of where they each are on the drive?  I want a 
>> clean separation between the code that is part of the web2py framework 
>> itself and the code that is specific to my app.
>>
>> Thanks,
>> Brendan
>>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to