The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From: Graham Higgins <gjhigg...@googlemail.com>
Date: Fri, 1 Sep 2006 01:08:26 +0100
Local: Thurs, Aug 31 2006 8:08 pm
Subject: Re: Adding <?python ?> support? (was Re: TextMate bundle)
On 31 Aug 2006, at 23:36, Christopher Lenz wrote: > In many cases, though, I think using a functional approach in the The expressive economy of template functions is well worth > templates is superior to using imperative Python statements in > processing instructions. exploiting, purely to reduce the complexity and to ease maintenance. However, I've found that template functions don't help much when generating presentation-oriented Javascript which references page content - choose your poison, hack presentation logic in the controller or use a PI in the template. TG's default kid templates currently use the <?python?>PI to check identity, selectively rendering a "login" / "logout" link as appropriate - although might be a moot point as to whether that should be considered to be application logic or presentation logic. > I think this approach fits quite nicely with templates, and we've Handy, thanks for that. > started collected some functions that are useful in common > presentation logic: > But I'm afraid that many people would still find it easier if they I'm not above hacking templates with application logic --- it doesn't > could just drop into raw Python in the template, which is why I'm > considering adding support for the <?python ?> PI. prompt a server restart and has proved to be a fluid and useful rapid prototyping technique for when I'm experimenting. After the page functionality is drafted out, I migrate the application logic into the model/controller as appropriate. Cheers, Graham. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||