[Zope3-dev] Re: Better access to APIs in paths (was Re: needingviewsclues - template/title troubles)

Casey Duncan casey@zope.com
Tue, 25 Feb 2003 13:56:33 -0500


Declarations like that suck rocks and can actually break your application as I 
recently found out with an altercation that pitted workflow guard conditions 
against the cookie crumbler resulting in some fun redirect recursion...

The convenience is nice, but the informality and assuming nature of it all 
isn't.

-Casey

On Tuesday 25 February 2003 12:32 pm, Shane Hathaway wrote:
> John D. Heintz wrote:
> > I'm also sorry to hear you might be finished with this thread Shane.
> > 
> > Your ideas parallel to XML namespaces is perfectly intuitive.
> 
> Thanks.  As I return to work on page templates that lack API 
> declarations and use a lot of Python expressions, I long for 
> namespace-bound APIs.  An example:
> 
> <html metal:define-macro="master"
>        tal:define="utool nocall:here/portal_url;
>                    mtool here/portal_membership;
>                    atool here/portal_actions;
>                    wtool here/portal_workflow;
>                    portal_object utool/getPortalObject;
>                    portal_title portal_object/Title;
>                    object_title here/Title;
>                    page_title page_title | template/title;
>                    portal_url here/portal_url;
>                    member mtool/getAuthenticatedMember;
>                    isAnon mtool/isAnonymousUser;
>                    actions python: atool.listFilteredActionsFor( here )=
;
>                    user_actions actions/user;
>                    object_actions actions/object;
>                    workflow_actions actions/workflow;
>                    folder_actions actions/folder;
>                    global_actions actions/global;
>                    wf_state
>                      python:wtool.getInfoFor(here,'review_state','');
>                   ">
> 
> This is quite brittle, but I can't fix it without breaking someone 
> else's derived templates.  Namespace-bound APIs would give me a way to 
> fix this culture.
> 
> Shane
> 
> 
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-dev
>