On Thu, Jan 15, 2009 at 2:31 PM, Dalius Dobravolskas <[email protected]> wrote: > On Thu, Jan 15, 2009 at 2:49 PM, mk <[email protected]> wrote: >> >> Gael Pasgrimaud wrote: >> >> > This work if you call the url http://localhost/data >> > Again, this decorator can *only* be used on a controller **action** >> >> Well that sucks then. >> >> DRY == good software engineering. Do I have to reimplement every single >> decorator if I want to use it on code other than controller action? >> >> That's bad: duplication, slight differences in behavior of two >> functions/classes, etc. > > That's not duplication. >
Yes, the pylons decorator also set the response's content-type to text/javascript. that the reason why you need the _py_object attribute. > -- > Dalius > http://blog.sandbox.lt > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
