[web2py] Re: Get All Controller Functions

2015-04-07 Thread Anthony
https://github.com/web2py/web2py/blob/master/applications/admin/controllers/default.py#L1062 On Tuesday, April 7, 2015 at 10:01:19 AM UTC-4, Ruud Schroen wrote: > > What part of the admin creates the list of controllers? I looked in > default.py but i couldn't find it.. :( > > On Monday, March 19

[web2py] Re: Get All Controller Functions

2015-04-07 Thread Ruud Schroen
What part of the admin creates the list of controllers? I looked in default.py but i couldn't find it.. :( On Monday, March 19, 2012 at 11:16:45 AM UTC+1, Hassan Alnatour wrote: > > Dear ALL , > > How Can I Get ALL controller functions , as i know i can get the one > am at in the view using req

[web2py] Re: Get All Controller Functions

2012-03-19 Thread Alan Etkin
Ok, then the right approach is the admin's (I think it reads the controller files and does some sort of filtering with regular expressions). It even collects all function names from any controller in the app in a dictionary. What if web2py exposed that list for each app in an environment object (al

[web2py] Re: Get All Controller Functions

2012-03-19 Thread Anthony
I don't think that will distinguish functions defined in models or imported within models or the controller, though I guess in most cases such functions wouldn't have no arguments. Anthony On Monday, March 19, 2012 1:28:10 PM UTC-4, Alan Etkin wrote: > > Would this work inside a controller? >

[web2py] Re: Get All Controller Functions

2012-03-19 Thread Alan Etkin
Would this work inside a controller? # this module belongs to the Python Standard Library # http://docs.python.org/library/inspect.html#module-inspect import inspect # when using the same globals() an exception is thrown for k, v in globals().copy().iteritems(): if inspect.isfunction(v):

[web2py] Re: Get All Controller Functions

2012-03-19 Thread Anthony
Here's how the admin app does it: http://code.google.com/p/web2py/source/browse/applications/admin/controllers/default.py#728. You might try something like that. Anthony On Monday, March 19, 2012 6:16:45 AM UTC-4, Hassan Alnatour wrote: > > Dear ALL , > > How Can I Get ALL controller functio