better error reporing on app_create failures

This commit is contained in:
mdipierro
2012-08-24 17:05:18 -05:00
parent 78e1815395
commit c5be7cb2f7
4 changed files with 31 additions and 17 deletions
+4 -3
View File
@@ -206,7 +206,8 @@ def site():
elif form_create.accepted:
# create a new application
appname = cleanpath(form_create.vars.name)
if app_create(appname, request):
created, error = app_create(appname, request,info=True)
if created:
if MULTI_USER_MODE:
db.app.insert(name=appname,owner=auth.user.id)
log_progress(appname)
@@ -214,8 +215,8 @@ def site():
redirect(URL('design',args=appname))
else:
session.flash = \
T('unable to create application "%s" (it may exist already)',
form_create.vars.name)
DIV(T('unable to create application "%s"' % appname),
PRE(error))
redirect(URL(r=request))
elif form_update.accepted:
+3 -5
View File
@@ -83,8 +83,8 @@
<div class="box">
<h3>{{=T("Multi User Mode")}}</h3>
<p>
{{=button(URL('bulk_register'),T('Bulk Register'))}}
{{=button(URL('manage_students'),T('Manage Students'))}}
{{=button(URL('bulk_register'),T('Bulk Register'))}}
{{=button(URL('manage_students'),T('Manage Students'))}}
</p>
</div>
{{pass}}
@@ -135,15 +135,13 @@
{{=form_update.custom.end}}
</div>
<!-- DEPLOY ON GAE -->
{{if not MULTI_USER_MODE or is_manager():}}
<div class="box">
<h3>{{=T("Deploy")}}</h3>
<p>
{{=button(URL('gae','deploy'), T('Deploy on Google App Engine'))}}
{{=button(URL('openshift','deploy'),T('Deploy to OpenShift'))}}
</p>
</div>
{{pass}}
</div><br/>
{{if TWITTER_HASH:}}
<div class="box">
<h3>{{=T("%s Recent Tweets"%TWITTER_HASH)}}</h3>