merged with Mariano's branch (inlucdes better debug.py and ace editor

This commit is contained in:
Massimo DiPierro
2012-03-13 21:15:04 -05:00
parent 80e36aec6a
commit f75a4cbe45
46 changed files with 990 additions and 34 deletions
+11 -8
View File
@@ -220,12 +220,15 @@ def site():
def pack():
app = get_app()
if len(request.args) == 1:
fname = 'web2py.app.%s.w2p' % app
filename = app_pack(app, request)
else:
fname = 'web2py.app.%s.compiled.w2p' % app
filename = app_pack_compiled(app, request)
try:
if len(request.args) == 1:
fname = 'web2py.app.%s.w2p' % app
filename = app_pack(app, request, raise_ex=True)
else:
fname = 'web2py.app.%s.compiled.w2p' % app
filename = app_pack_compiled(app, request, raise_ex=True)
except Exception, e:
filename = None
if filename:
response.headers['Content-Type'] = 'application/w2p'
@@ -233,7 +236,7 @@ def pack():
response.headers['Content-Disposition'] = disposition
return safe_read(filename, 'rb')
else:
session.flash = T('internal error')
session.flash = T('internal error: %s' % e)
redirect(URL('site'))
def pack_plugin():
@@ -479,7 +482,7 @@ def edit():
offset = e.offset - (len(e.text) - len(e.text.splitlines()[-1]))
else:
offset = 0
highlight = {'start': start, 'end': start + offset + 1}
highlight = {'start': start, 'end': start + offset + 1, 'lineno': e.lineno}
try:
ex_name = e.__class__.__name__
except: