diff --git a/VERSION b/VERSION index 9fd29c37..7447295f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.9.5-trunk+timestamp.2014.03.29.17.27.37 +Version 2.9.5-trunk+timestamp.2014.03.29.17.42.51 diff --git a/gluon/widget.py b/gluon/widget.py index 2214145e..770e3aed 100644 --- a/gluon/widget.py +++ b/gluon/widget.py @@ -618,6 +618,12 @@ def console(): type='int', help='port of server (8000)') + parser.add_option('-G', + '--GAE', + default=None, + dest='gae', + help="'-G configure' will create app.yaml and gaehandler.py") + msg = ('password to be used for administration ' '(use -a "" to reuse the last password))') parser.add_option('-a', @@ -923,6 +929,20 @@ def console(): global_settings.cmd_options = options global_settings.cmd_args = args + if options.gae: + if not os.path.exists('app.yaml'): + name = raw_input("Your GAE app name: ") + content = open(os.path.join('examples','app.example.yaml'),'rb').read() + open('app.yaml','wb').write(content.replace("yourappname",name)) + else: + print "app.yaml alreday exists in the web2py folder" + if not os.path.exists('gaehandler.py'): + content = open(os.path.join('handlers','gaehandler.py'),'rb').read() + open('gaehandler.py','wb').write(content) + else: + print "gaehandler.py alreday exists in the web2py folder" + sys.exit(0) + try: options.ips = list(set( # no duplicates [addrinfo[4][0] for addrinfo in getipaddrinfo(socket.getfqdn())