Just replace the existing response.menu assignment in menu.py (in the models folder) with this...
import os
from gluon.myregex import regex_expose
ctldir = os.path.join(request.folder,"controllers")
ctls=os.listdir(ctldir)
if 'appadmin.py' in ctls: ctls.remove('appadmin.py')
response.menu = []
for ctl in ctls:
if ctl.endswith(".bak") == False:
filename = os.path.join(ctldir,ctl)
data = open(filename, 'r').read()
functions = regex_expose.findall(data)
ctl = ctl[:-3].replace("_"," ")
response.menu.append([ctl.capitalize(), False, '#',
[[f.replace("_"," ").capitalize(), False,URL(request.application,ctl,f)] for f in functions]])
Comments (0)