fixed issues with grid form and b.parent
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.0.9 (2012-09-30 07:30:01) dev
|
||||
Version 2.0.9 (2012-09-30 08:31:56) dev
|
||||
|
||||
+4
-4
@@ -419,11 +419,11 @@ class Response(Storage):
|
||||
BUTTON = TAG.button
|
||||
admin = URL("admin","default","design",
|
||||
args=current.request.application)
|
||||
from gluon.dal import thread_local
|
||||
if hasattr(thread_local,'instances'):
|
||||
from gluon.dal import THREAD_LOCAL
|
||||
if hasattr(THREAD_LOCAL,'instances'):
|
||||
dbstats = [TABLE(*[TR(PRE(row[0]),'%.2fms' % (row[1]*1000)) \
|
||||
for row in i.db._timings]) \
|
||||
for i in thread_local.instances]
|
||||
for i in THREAD_LOCAL.instances]
|
||||
dbtables = dict([(regex_nopasswd.sub('******',i.uri),
|
||||
{'defined':
|
||||
sorted(list(set(i.db.tables) -
|
||||
@@ -431,7 +431,7 @@ class Response(Storage):
|
||||
'[no defined tables]',
|
||||
'lazy': sorted(i.db._LAZY_TABLES.keys()) or
|
||||
'[no lazy tables]'})
|
||||
for i in thread_local.instances])
|
||||
for i in THREAD_LOCAL.instances])
|
||||
else:
|
||||
dbstats = [] # if no db or on GAE
|
||||
dbtables = {}
|
||||
|
||||
+1
-1
@@ -1150,7 +1150,7 @@ class SQLFORM(FORM):
|
||||
else:
|
||||
table = formstyle(self, xfields)
|
||||
for id,a,b,c in xfields:
|
||||
self.field_parent[id] = b.parent
|
||||
self.field_parent[id] = getattr(b,'parent',None)
|
||||
else:
|
||||
raise RuntimeError, 'formstyle not supported'
|
||||
return table
|
||||
|
||||
Reference in New Issue
Block a user