Using the following controller the first page shows up and everything works
as expected until I select a next page of the grid.
First page:
<Storage {'_formkey': 'c8868643-80d8-406a-b1b9-cb87304ad4aa', 'tt':
'article', '_formname': 'no_table/create', 'tabel': 'ufs'}>
On the second page there is no 'tt 'nor 'tabel'.
Why?
The controller is below.
Johann.
def lys_vermiste_titels():
tabel = request.vars.tabel
tt = request.vars.tt #titelveld
t = Univ(db) #module with db.define_table...
-----> Error occurs here. tabel == None
db[tabel].id.represent = lambda value, row: A(T('check'),
_href = URL(r = request, c = 'default',
f = 'hanteer_vermiste_titels',
vars = dict(prof_id = value, tabel =
tabel, tt = tt)))
query = db[tabel].titel_reg == False
fields = [db[tabel].id, db[tabel][tt]]
tb = SQLFORM.grid(query,
#left = db.akb_articles.on(db.akb_articles.ltitle ==
db[tabel].ltitle),
fields = fields, details = False, csv=False,
maxtextlength = 140,
editable = False, searchable = False, create = False,
deletable = False)
lengte = len(tb)
if lengte:
result =[]
opskrif = H2(T("Title in %s and not in AKB") % tabel)
else:
opskrif = H2(T('All the article titles in %s are in AKB') % tabel)
tb = H3(P(T('No absent titles.')))
if lengte:
opskrif = H2(T("Titles in %s that are not in AKB") % tabel)
else:
opskrif = H2(T('All the article titles in %s are in AKB') % tabel)
tb = H3(P(T('No absent titles.')))
return dict(vorm = tb, opskrif = opskrif)
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)