support web2py.py --GAE {app-name}, thanks Paolo

This commit is contained in:
mdipierro
2019-04-06 20:05:39 -07:00
parent f2dcc53a18
commit 33fe831287
2 changed files with 5 additions and 3 deletions

View File

@@ -618,7 +618,7 @@ def console():
'--GAE',
default=None,
dest='gae',
help="'-G configure' will create app.yaml and gaehandler.py")
help="'-G {gae app name}' will create app.yaml and gaehandler.py")
msg = ('password to be used for administration '
'(use -a "<recycle>" to reuse the last password))')
@@ -937,7 +937,9 @@ def console():
if options.gae:
if not os.path.exists('app.yaml'):
name = input("Your GAE app name: ")
name = options.gae
if name == 'configure':
name = 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: