"Elvelind Grandin" <[EMAIL PROTECTED]> writes:

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

This is REALLY cool!  I am actually using something like "w3m -dump" to
generate emails using HTML templates (to send it as text), but having a proper
stringTemplate would be much better.  Is this "stringTemplate" hypothetical or
it works already?  If it works, is its syntax the same as the one Kid uses?

Thanks for you attention and for the answer! :-)

(And please, see my complaint about this change breaking JSON, Kevin blamed
you :-))

-- 
Jorge Godoy      <[EMAIL PROTECTED]>

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

Reply via email to