fixed issue 1064
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.0.9 (2012-10-02 14:55:51) dev
|
Version 2.0.9 (2012-10-03 11:53:40) dev
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ def select():
|
|||||||
if match:
|
if match:
|
||||||
table = match.group('table')
|
table = match.group('table')
|
||||||
try:
|
try:
|
||||||
|
tb = None
|
||||||
nrows = db(query).count()
|
nrows = db(query).count()
|
||||||
if form.vars.update_check and form.vars.update_fields:
|
if form.vars.update_check and form.vars.update_fields:
|
||||||
db(query).update(**eval_in_global_env('dict(%s)'
|
db(query).update(**eval_in_global_env('dict(%s)'
|
||||||
@@ -221,6 +222,8 @@ def select():
|
|||||||
else:
|
else:
|
||||||
rows = db(query,ignore_common_filters=True).select(limitby=(start, stop))
|
rows = db(query,ignore_common_filters=True).select(limitby=(start, stop))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
import traceback
|
||||||
|
tb = traceback.format_exc()
|
||||||
(rows, nrows) = ([], 0)
|
(rows, nrows) = ([], 0)
|
||||||
response.flash = DIV(T('Invalid Query'),PRE(str(e)))
|
response.flash = DIV(T('Invalid Query'),PRE(str(e)))
|
||||||
# begin handle upload csv
|
# begin handle upload csv
|
||||||
@@ -250,6 +253,7 @@ def select():
|
|||||||
rows=rows,
|
rows=rows,
|
||||||
query=request.vars.query,
|
query=request.vars.query,
|
||||||
formcsv = formcsv,
|
formcsv = formcsv,
|
||||||
|
tb = tb,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,12 @@
|
|||||||
{{elif request.function=='select':}}
|
{{elif request.function=='select':}}
|
||||||
<h2>{{=XML(str(T("Database %s select"))%A(request.args[0],_href=URL('index'))) }}
|
<h2>{{=XML(str(T("Database %s select"))%A(request.args[0],_href=URL('index'))) }}
|
||||||
</h2>
|
</h2>
|
||||||
|
{{if tb:}}
|
||||||
|
<h3>{{=T('Traceback')}}</h3>
|
||||||
|
<pre>
|
||||||
|
{{=tb}}
|
||||||
|
</pre>
|
||||||
|
{{pass}}
|
||||||
{{if table:}}
|
{{if table:}}
|
||||||
{{=A(str(T('New Record')),_href=URL('insert',args=[request.args[0],table]),_class="btn")}}<br/><br/>
|
{{=A(str(T('New Record')),_href=URL('insert',args=[request.args[0],table]),_class="btn")}}<br/><br/>
|
||||||
<h3>{{=T("Rows in Table")}}</h3><br/>
|
<h3>{{=T("Rows in Table")}}</h3><br/>
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ def select():
|
|||||||
if match:
|
if match:
|
||||||
table = match.group('table')
|
table = match.group('table')
|
||||||
try:
|
try:
|
||||||
|
tb = None
|
||||||
nrows = db(query).count()
|
nrows = db(query).count()
|
||||||
if form.vars.update_check and form.vars.update_fields:
|
if form.vars.update_check and form.vars.update_fields:
|
||||||
db(query).update(**eval_in_global_env('dict(%s)'
|
db(query).update(**eval_in_global_env('dict(%s)'
|
||||||
@@ -221,6 +222,8 @@ def select():
|
|||||||
else:
|
else:
|
||||||
rows = db(query,ignore_common_filters=True).select(limitby=(start, stop))
|
rows = db(query,ignore_common_filters=True).select(limitby=(start, stop))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
import traceback
|
||||||
|
tb = traceback.format_exc()
|
||||||
(rows, nrows) = ([], 0)
|
(rows, nrows) = ([], 0)
|
||||||
response.flash = DIV(T('Invalid Query'),PRE(str(e)))
|
response.flash = DIV(T('Invalid Query'),PRE(str(e)))
|
||||||
# begin handle upload csv
|
# begin handle upload csv
|
||||||
@@ -250,6 +253,7 @@ def select():
|
|||||||
rows=rows,
|
rows=rows,
|
||||||
query=request.vars.query,
|
query=request.vars.query,
|
||||||
formcsv = formcsv,
|
formcsv = formcsv,
|
||||||
|
tb = tb,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,12 @@
|
|||||||
{{elif request.function=='select':}}
|
{{elif request.function=='select':}}
|
||||||
<h2>{{=XML(str(T("Database %s select"))%A(request.args[0],_href=URL('index'))) }}
|
<h2>{{=XML(str(T("Database %s select"))%A(request.args[0],_href=URL('index'))) }}
|
||||||
</h2>
|
</h2>
|
||||||
|
{{if tb:}}
|
||||||
|
<h3>{{=T('Traceback')}}</h3>
|
||||||
|
<pre>
|
||||||
|
{{=tb}}
|
||||||
|
</pre>
|
||||||
|
{{pass}}
|
||||||
{{if table:}}
|
{{if table:}}
|
||||||
{{=A(str(T('New Record')),_href=URL('insert',args=[request.args[0],table]),_class="btn")}}<br/><br/>
|
{{=A(str(T('New Record')),_href=URL('insert',args=[request.args[0],table]),_class="btn")}}<br/><br/>
|
||||||
<h3>{{=T("Rows in Table")}}</h3><br/>
|
<h3>{{=T("Rows in Table")}}</h3><br/>
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ def select():
|
|||||||
if match:
|
if match:
|
||||||
table = match.group('table')
|
table = match.group('table')
|
||||||
try:
|
try:
|
||||||
|
tb = None
|
||||||
nrows = db(query).count()
|
nrows = db(query).count()
|
||||||
if form.vars.update_check and form.vars.update_fields:
|
if form.vars.update_check and form.vars.update_fields:
|
||||||
db(query).update(**eval_in_global_env('dict(%s)'
|
db(query).update(**eval_in_global_env('dict(%s)'
|
||||||
@@ -221,6 +222,8 @@ def select():
|
|||||||
else:
|
else:
|
||||||
rows = db(query,ignore_common_filters=True).select(limitby=(start, stop))
|
rows = db(query,ignore_common_filters=True).select(limitby=(start, stop))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
import traceback
|
||||||
|
tb = traceback.format_exc()
|
||||||
(rows, nrows) = ([], 0)
|
(rows, nrows) = ([], 0)
|
||||||
response.flash = DIV(T('Invalid Query'),PRE(str(e)))
|
response.flash = DIV(T('Invalid Query'),PRE(str(e)))
|
||||||
# begin handle upload csv
|
# begin handle upload csv
|
||||||
@@ -250,6 +253,7 @@ def select():
|
|||||||
rows=rows,
|
rows=rows,
|
||||||
query=request.vars.query,
|
query=request.vars.query,
|
||||||
formcsv = formcsv,
|
formcsv = formcsv,
|
||||||
|
tb = tb,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,12 @@
|
|||||||
{{elif request.function=='select':}}
|
{{elif request.function=='select':}}
|
||||||
<h2>{{=XML(str(T("Database %s select"))%A(request.args[0],_href=URL('index'))) }}
|
<h2>{{=XML(str(T("Database %s select"))%A(request.args[0],_href=URL('index'))) }}
|
||||||
</h2>
|
</h2>
|
||||||
|
{{if tb:}}
|
||||||
|
<h3>{{=T('Traceback')}}</h3>
|
||||||
|
<pre>
|
||||||
|
{{=tb}}
|
||||||
|
</pre>
|
||||||
|
{{pass}}
|
||||||
{{if table:}}
|
{{if table:}}
|
||||||
{{=A(str(T('New Record')),_href=URL('insert',args=[request.args[0],table]),_class="btn")}}<br/><br/>
|
{{=A(str(T('New Record')),_href=URL('insert',args=[request.args[0],table]),_class="btn")}}<br/><br/>
|
||||||
<h3>{{=T("Rows in Table")}}</h3><br/>
|
<h3>{{=T("Rows in Table")}}</h3><br/>
|
||||||
|
|||||||
Reference in New Issue
Block a user