On Jan 15, 4:49 am, mk <[email protected]> wrote:
> Gael Pasgrimaud wrote:
> > This work if you call the urlhttp://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?

But... if you aren't using @jsonify on a controller action, you
probably don't need the functionality it provides. That is, in a
Pylons app, you return responses only from controller actions and
@jsonify modifies the response (setting it's content type, as someone
already noted).

> That's bad: duplication, slight differences in behavior of two
> functions/classes, etc.

?

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to