On 3/17/06, Jorge Godoy <[EMAIL PROTECTED]> wrote:
>
> "Elvelind Grandin" <[EMAIL PROTECTED]> writes:
>
> > I have just commited some changes to expose in rev 962.
> > This will allow for some new syntax to do nifty things in the expose
>
> Fo us, curious people, what kind of nifty things? ;-)
well. how about this
@expose("stringTemplate:.welcome", as_format="text")
@expose(".templates.xml", accept_format="xml/foo")
@expose("json")
@expose(".templates.welcome")
def ..
which would give you the welcome template as default, json from
tg_format=json. the text template from tg_format=text and the xml if
the accept header is xml/foo.
I will also add a custome rule argument so that you could do
dispatching on whatever options you like.
>
> > decorator (or rather decorators). But it should be backwards
> > compatible, all the tests runs fine so I hope it wont break anything.
> > Please let me know if you run into troubles.
>
> I will. Michele has already called me annoying... :-)
>
> --
> Jorge Godoy <[EMAIL PROTECTED]>
>
>
>
--
cheers
elvelind grandin
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---