i handle this two different ways: 1- I'll use a helper function to handle this
/lib/helpers/comments def list_comments( object , offset=0 , limit=10 ): # stuff here to grab the comments # return fragment or populate c? who knows 2- I'll use a shared inheritance class def _list_comments( self , offset=0 , limit=10 ): # stuff here to grab the comments # return fragment or populate c? who knows # self has a class var that tells what kind of object we're looking at i really dislike the idea of using a subquery: - if your app is transaction safe, you just complicated stuff a lot - if your app has any sort of auth or setup overhead on the request, you're now running it again ( ie: BaseController's __init__ and __before__ ) - you're having a controller's public method that also acts as private. methods should really be public or private. i think helper functions and inherited classes are more appropriate. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-disc...@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.