On Tue, Feb 2, 2010 at 5:04 PM, Mark Ramm <[email protected]>wrote:
> > - make override_template work for all content types > > I use this to a have single controller serving javascripts generated > > at runtime from templates, so that calling /parsedjs/<scriptname>.js > > will parse <scriptname>.mak and return the result with a content_type > > of "text/javascript". (At the moment override_template only works for > > the "text/html" engine) > > Sounds like a very reasonable an simple patch. Definitely post this to > trac. > > yep, it's quite a simple patch, here it is: http://trac.turbogears.org/ticket/2457 > - allow custom REST-like methods in RestController > > I added this to have a consistent API, exposing custom methods the > > same way as REST verbs. > > For example you can define get_archive() and post_archive() in your > > "movies" controller and use them like this: > > GET /movies/1/archive > > POST /movies/1?_method=ARCHIVE > > This is possibly more controversial since one of the REST principles > is to limit the number of verbs in the system. But, I still think > it's worth discussing further here and posting to trac. > > http://trac.turbogears.org/ticket/2458 right, I see your point! I made this for the sake of consistency, and to avoid cluttering too much the RESTfulness of a controller I made it so that to have a method act as a REST action you must add its name to the "custom_actions" property of the controller (see the ticket for an example). But, of course, I'm very interested in hearing what you all think about it! thanks! lorenzo -- 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?hl=en.
