Re: [web2py] Nesting functions inside functions in controllers

2011-08-21 Thread Bruno Rocha
I guess it is not wrong, but I do not recommend too much code in controllers, controllers should be for decide the app flow. I reccomend you to create a module in /modules # modules/myobjects.py from gluon import * request = current.request class Myobjects(object): def showsearch(self, db):

[web2py] Nesting functions inside functions in controllers

2011-08-21 Thread Jarrod Cugley
Is there anything wrong with doing this inside default.py controller?: def search(): def showsearch(): search = db(db.listing.title==request.args(0)).select(db.listing.ALL) items = [] for person in search: items.append(DIV(A(person.first_name, _href=URL('lis