Evan Simpson wrote: Guido van Rossum wrote: IMO TALES should solve this for itself by introducing an if/then/else expression form rather than depending on Python. If you can have a not:.. expression, surely you can have an if:..:then:..:else:.. expression. Now that you point it out, it's not
(Tested with div tal:replace=if:options/x then:string:yes else:string:no) There are an awful lot of colons in there :-) Here's an off-the-wall idea: div tal:replace=talif tal:if=options/x tal:true=string:yes tal:false=string:no This looks better as a tal:tag
I'm trying to compare two number, or at least I think they're numbers. If I do: dtml-var i dtml-var j dtml-if expr=i == j Equal block /dtml-if I and J print out the same, but do not compare to be equal since Equal block string doesn't print. I must be doing something wrong.
On March 5, Paul Winkler wrote: * more coupling Yes. * performance hit Yes. * one more detail to pay attention to Yes. OTOH, doing the magic in user.allowed() would mean I'd only need one special UserFolder instance at the top of the hierarchy, and then everything else Just Works
On Fri, Mar 07, 2003 at 08:56:59AM +1100, Adrian van den Dries wrote: (/me revisits LDAPUserFolder) Looks like the work is already done for you anyway: allowed() and friends check if the context has an attribute acl_satellite, and queries it for any additional roles, and it even keeps a