This technique for menu link generation is not working as the mount
point is changed and it is not necessary to provide plural form of
the table name as mount point.
For example if i put my mount point as all_movies instead of movies
when by model name is movie, then the links will not work as the they
still point to movies.

models = {}
for m in dir(model):
    m = getattr(model, m)
    if not inspect.isclass(m):
        continue
    try:
        mapper = class_mapper(m)
        models[m.__name__.lower()] = m
    except:
        pass

ref :
http://www.turbogears.org/2.1/docs/main/Extensions/Crud/index.html#menu-items

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to