[Zope] Style guide for ZPT?

Paul Winkler pw_lists at slinkp.com
Fri Mar 18 15:04:45 EST 2005


Hiya,

I've been asked to come up with some formal coding standards for
my employer's Zope projects.

For Python code, I just use the relevant PEPs (maybe with a few
addendums), but I'm wondering if anything similar exists for ZPTs so I
don't have to completely reinvent the wheel.

Validating as XHTML is a good first step, but that can still leave you
with random indentation, absurdly long TALES statements, ugly loop
idioms, use of "tal:replace" vs. use of macros, whether or not "tal:"
and "metal:" attributes should be on the same line as vanilla XHTML
attributes, etc.

The first of those is easy to fix with Tidy, but the others are
necessarily zope-specific.

I seem to recall there was a ZPT style guide for Plone at some point,
but it's resisting all my best efforts at googling - I get hints that
something existed but has vanished from the net.  For example:
http://www.tchezope.org/traducoes/lp/ingles/7
"Temporarily discontinued, out of date"

If nothing turns up, I'll probably just write my own based on what I
like and publish it somewhere, maybe on zopewiki.org.  (But not till
after my impending vacation...)

-- 

Paul Winkler
http://www.slinkp.com


More information about the Zope mailing list