This commit is contained in:
mdipierro
2017-06-27 16:43:42 -05:00
parent 81fa787ec2
commit 757ce4e76e
3 changed files with 9 additions and 3 deletions
+4 -1
View File
@@ -16,6 +16,7 @@ from gluon.tools import Config
from gluon.compileapp import find_exposed_functions from gluon.compileapp import find_exposed_functions
from glob import glob from glob import glob
from gluon._compat import iteritems, PY2, pickle, xrange, urlopen, to_bytes, StringIO, to_native from gluon._compat import iteritems, PY2, pickle, xrange, urlopen, to_bytes, StringIO, to_native
import gluon.rewrite
import shutil import shutil
import platform import platform
@@ -249,6 +250,7 @@ def site():
db.app.insert(name=appname, owner=auth.user.id) db.app.insert(name=appname, owner=auth.user.id)
log_progress(appname) log_progress(appname)
session.flash = T('new application "%s" created', appname) session.flash = T('new application "%s" created', appname)
gluon.rewrite.load()
redirect(URL('design', args=appname)) redirect(URL('design', args=appname))
else: else:
session.flash = \ session.flash = \
@@ -266,6 +268,7 @@ def site():
new_repo = git.Repo.clone_from(form_update.vars.url, target) new_repo = git.Repo.clone_from(form_update.vars.url, target)
session.flash = T('new application "%s" imported', session.flash = T('new application "%s" imported',
form_update.vars.name) form_update.vars.name)
gluon.rewrite.load()
except git.GitCommandError as err: except git.GitCommandError as err:
session.flash = T('Invalid git repository specified.') session.flash = T('Invalid git repository specified.')
redirect(URL(r=request)) redirect(URL(r=request))
@@ -302,6 +305,7 @@ def site():
log_progress(appname) log_progress(appname)
session.flash = T(msg, dict(appname=appname, session.flash = T(msg, dict(appname=appname,
digest=md5_hash(installed))) digest=md5_hash(installed)))
gluon.rewrite.load()
else: else:
msg = 'unable to install application "%(appname)s"' msg = 'unable to install application "%(appname)s"'
session.flash = T(msg, dict(appname=form_update.vars.name)) session.flash = T(msg, dict(appname=form_update.vars.name))
@@ -1861,7 +1865,6 @@ def user():
def reload_routes(): def reload_routes():
""" Reload routes.py """ """ Reload routes.py """
import gluon.rewrite
gluon.rewrite.load() gluon.rewrite.load()
redirect(URL('site')) redirect(URL('site'))
+4 -1
View File
@@ -137,7 +137,10 @@ class RestrictedError(Exception):
self.environment = environment self.environment = environment
if layer: if layer:
try: try:
self.traceback = traceback.format_exc(limit=1) try:
self.traceback = traceback.format_exc()
except:
self.traceback = traceback.format_exc(limit=1)
except: except:
self.traceback = 'no traceback because template parsing error' self.traceback = 'no traceback because template parsing error'
try: try: