I've thought today that it would be nice to have django-like filters in
Kid. In short,
django filters are like unix pipes - a way to chain functions. For
example,
{{ name | lower }}, or {{ identity.is_anonymous() | yes_no }}. I
personally missed the latter many times, especially due to the lack of
conditional expressions in Python<2.5.

It was fairly easy to add it to Kid (but with double-pipe, to not break
Python's syntax). I've posted in my blog a patch (for Kid), together
with some explanation:

http://www.thesamet.com/blog/2006/12/04/django-like-filters-for-kid/

If we like the idea, then maybe we can push this into Kid and Genshi.

Best,
Nadav


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to