[Zope-dev] Re: ZPT for CSS, anyone?

Chris Withers lists at simplistix.co.uk
Fri Apr 2 03:44:20 EST 2004


Shane Hathaway wrote:
> 
> I think it would be pretty neat. :-)

And YET ANOTHER thing the poor Zope user has to learn when they start:

Python
ZConfig
ZCML
ZPT
(this thing)

...and that's assuming (this thing) totally replaces DTMhelL, which you and i 
both know it won't :-(

>> Still, maybe a TALES-in-plain-text thing has some merits, but then you 
>> want defines, a repeats, and you end up with TAL.
> 
> Repeats wouldn't make sense in this language.  

Yeah they would, every language needs repeats in the end...

> Conditions would, but 
> they would apply to the whole rule, not individual attributes.

Ah, okay, I think building something purely for CSS would REALLY suck.

Something which could generically build SQL, CSS, Emails I would be less lielyl 
to vomit about...

>> template="""
>> p {
>>   color: %(color)s;
>>   background-color: %(bgcolor)s;
>> }
>> """
>> preferences = context.getProperty('preferences',{})
>> dict = {
>>  'color':preferences.get('color','gray'),
>>  'bgcolor':preferences.get('bgcolor'white'),
>> }
>> return template % dict

> That's a mess.

So persuade the Python guys to make string interpolation as powerful as you need 
it to be ;-)

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk




More information about the Zope-Dev mailing list