[Zope3-dev] Re: Python Tab for Page Templates
Chris Withers
chrisw@nipltd.com
Wed, 23 Apr 2003 09:10:52 +0100
Jeffrey P Shell wrote:
>
> Seriously - I'd like to see the need for this proposed and defended. I
> have some Page Templates in an existing site that do use a rather
> intense "preloader" Python Script that builds all the data structures
> necessary for the page, but the page in question and the Python Code are
> kept rather separate (not in the same folder - barely even in the same
> branch of the site). One reason that we did this is because our
> customer has access to the page templates for the main site, but we
> don't want to give him access to any application-level Python Code.
I think you've explained your reason here ;-)
> There's also this to think about (hence the need for a proposal). If
> you put a "Python Tab" on a Page Template, what do you see when you edit
> via FTP?
In an ideal world, you'd see a folder with the name of your template. In that
would be a 'zpt' file and a 'python' file... This would work for the other
file-like scenarios you mention.
> FWIW, I do this when the situation warrants::
>
> <tal:setup define="global extended something/that/returns/a/dict" />
Indeed, but where does your something come from? Unless you have reasons like
yours above, you'd probably want it to come from somewhere near your page
template. A tab seemed like a nice idea to us at the UK sprint...
cheers,
Chris