from a coding point of view
tablename=request.controller
rows = db(db[tablename]).select()
return dict(rows=rows)
but the problem is that you have two controllers. Perhaps you should
have only one.
On Jan 18, 2:59 pm, walter wdv...@gmail.com wrote:
I have two controllers which differ only a
but the problem is that you have two controllers. Perhaps you should have
only one.
I have thought about it. Unfortunately, I need sometimes show all our
customers but at the next time I need view all them trips. I would be
glad to do merge two controllers into the one. But I cannot figure out
def sections():
allowedtables = ['table1','table2']
tablename = request.args(0)
if tablename in allowedtables:
rows = db(db[tablename]).select()
else:
rows = 'You can't access this table'
return dict(rows=rows)
http://myapp/default/sections/tablename
Is
On Jan 18, 2011, at 1:59 PM, walter wrote:
but the problem is that you have two controllers. Perhaps you should have
only one.
I have thought about it. Unfortunately, I need sometimes show all our
customers but at the next time I need view all them trips. I would be
glad to do merge two
For starters, I wouldn't get so hung up on DRY. Are the pages you are
creating very nearly identical but with different data sets?
Jonathan's suggestion sounds good:
http://app/default/show/t http://app/default/show/tablenamerips
http://app/default/show/p http://app/default/show/tablenameersons
2011/1/19 pbreit pbreitenb...@gmail.com
For starters, I wouldn't get so hung up on DRY. Are the pages you are
creating very nearly identical but with different data sets?
Jonathan's suggestion sounds good:
http://app/default/show/t http://app/default/show/tablenamerips
6 matches
Mail list logo