On Oct 14, 2006, at 10:18 PM, Jorge Vargas wrote:
>
> Hi
>
> I'm writting a set of controllers/templates to simplify development
>
> one will be a small template and a simple controller method that will
> show all the possible URLs that controller has, so far I got this
>
> @expose(template="remindme.templates.links")
> def index(self):
> import inspect
> methods=inspect.getmembers(self,inspect.ismethod)
> methods =[method[0] for method in methods if not method
> [0].startswith("_")]
> #methods =[method[0] for method in methods if not method[1].exposed]
> return dict(methods=methods)
>
> I know the startswith is a hack but I got lost on the expose code with
> the generic functions.
>
> The commented line is what you should expect with plain CP but it
> seems the TG expose is not doing that (small suggestion why dont we
> add it for compatibility?)
if not getattr(method[1], "exposed", False)
we do indeed set exposed on exposed methods (otherwise CP would
ignore them)
Kevin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk
-~----------~----~----~----~------~----~------~--~---