Re: [Zope] dtml-if

2005-08-28 Thread David Siedband
Try calling id then comparing it. dtml-if id()==last this one! /dtml-if -- David On Aug 28, 2005, at 7:19 PM, michael wrote: Thanks for your reply, that is half way there, I want to compare two variables though. where as 'my page' is constant, and hard coded in. someone's gotta know :-)

Re: [Zope] Random Module

2005-08-25 Thread David Siedband
Are you sure you can't import the functions you need? It might be worthwhile to see if what you want to do can be done without adding to your allowed modules. That should be kind of a last resort. I'm curious what kind of functionality you need from random that can't be done within the

Re: [Zope] rendering the contents of ..

2005-08-02 Thread David Siedband
I think something like this is what you're looking for: === from Products.PythonScripts.standard import html_quote import random request = container.REQUEST RESPONSE = request.RESPONSE q = container.quotes.objectValues('File') return random.choice(q) === cheers -- David On Aug 2, 2005, at

Re: [Zope] Using LocalFs in a form embedded in our application

2005-05-25 Thread David Siedband
installed? If not you should check that out. cheers -- David Siedband Oceanic Sky New Media http://oceanicsky.com On May 25, 2005, at 8:54 AM, Simon ALEXANDRE wrote: Hi, We are developing a web based application using Zope as webserver. One of our expected features consists in uploading

[Zope] formatting tuple to feed to mysql

2005-05-09 Thread David Siedband
I'm have a tuple that I want to pass to a zSQL query to so I can based on items in the tuple. I get the sequence from a zSQL query that selects a single field, and I'm postprocessing it with the following: dtml-let SelectedIDs=[ai[0] for ai in queries.selectDOdocIDs().tuples()] Which puts the