Assuming you are under the web2py folder using the linux Bash shell you can
do
mkdir applications/appname
cd applications/appname
tar zxvf ../../welcome.w2p
If instead you want to do it from Python, also assuming you are in the
web2py folder:
>>> import os
>>> from gluon.admin import w2p_unpack
>>> os.mkdir("applications/appname")
>>> w2p_unpack('welcome.w2p', "applications/appname")
You can make a script that does this:
<file name="create.py">
import sys
path = sys.argv[1] # first argument is location of web2py
appname = sys.argv[2] # second argument is name of app
os.chdir(path)
import os
from gluon.admin import w2p_unpack
os.mkdir("applications/%s" % appname)
w2p_unpack('welcome.w2p', "applications/%s" % appname)
</file>
then you would use is as
python create.py /path/to/web2py appname
On Monday, 10 June 2013 01:26:21 UTC-5, Muqeet Khan wrote:
>
>
> Hi,
>
> I am trying to create a web2py app from command line with -S ...
> However, I would like to create an app without the "No app, Create one?"
> question. Is there someway I can create it in a forceful manner.
>
> I have tried app_create() from gluon.admin but there I face the problem of
> the Request argument. None value for request doesn't seem to work.
>
> Help would really be appreciated. Thanks!
>
--
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.