Re: [Zope] (no subject)
+---[ Beema shafreen ]-- | acceptance rejection. -- Andrew Milton [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
Please take a look at the Zope book, in the section about security where it speaks about trusted and untrusted code. Basically, you can access from a Python script (i.e. untrused code) only those modules which are explicity declared so in Zope. time module is most probably not in those modules. Regards Marco On 3 Aug 2006 10:36:12 -, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm new to Zope, though I've been writing Python for some time. I have a fresh installation to which I've added a simple Python script (code below) in the root directory. When I test the script through the ZMI or attempt to access it via the web, I get an error: Error Type: Unauthorized Error Value: You are not allowed to access localtime in this context I'm logged in as a Manager and have tried setting the Proxy of the script to both Manager and Owner, to no avail. Can someone please help me understand what is happening and how to fix it? Thanks code of the script: import time t=time.localtime() print t return printed ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Marco Bizzarri http://notenotturne.blogspot.com/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
I couldn't reproduce this behavior. When I try to make such assignement (myObject.title='The new title'), Zope returns this messageattribute-less object (assign or del) I'm using Zope 2.7.6-final, python 2.3.4. Jose Henrique2006/7/18, Martijn Pieters [EMAIL PROTECTED]: On 18 Jul 2006 19:12:54 -, [EMAIL PROTECTED][EMAIL PROTECTED] wrote: Why, given an object called myObject with a title property, can I not change the title by saying simply: myObject.title='The new title'You can. Property sheets are aimed at ease of changing through theweb; it is a simple schema for simple properties.--Martijn Pieters___ Zope maillist-Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding!** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
On 18 Jul 2006 19:12:54 -, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Why, given an object called myObject with a title property, can I not change the title by saying simply: myObject.title='The new title' You can. Property sheets are aimed at ease of changing through the web; it is a simple schema for simple properties. -- Martijn Pieters ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
Yes, I feel like that sometimes too ;-) Dennis Allison wrote: -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
AZAIS Bruce wrote: Hi, excuse-me for my English but i'm french ;-) This is a Plone problem, you're likely to get more help on a Plone list. * Le contenu de ce courriel et ses eventuelles pièces jointes sont confidentiels. Ils s'adressent exclusivement à la personne destinataire. Si cet envoi ne vous est pas destiné, ou si vous l'avez reçu par erreur, et afin de ne pas violer le secret des correspondances, vous ne devez pas le transmettre à d'autres personnes ni le reproduire. Merci de le renvoyer à l'émetteur et de le détruire. Attention : L'Organisme de l'émetteur du message ne pourra être tenu responsable de l'altération du présent courriel. Il appartient au destinataire de vérifier que les messages et pièces jointes reçus ne contiennent pas de virus. Les opinions contenues dans ce courriel et ses éventuelles pièces jointes sont celles de l'émetteur. Elles ne reflètent pas la position de l'Organisme sauf s'il en est disposé autrement dans le présent courriel. ** Yay! We have a clean sweep: html mail, no subject line and an obnoxious footer. Bonus points for the foreign language... *sigh* Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
--On 16. November 2005 10:13:24 +0100 AZAIS Bruce [EMAIL PROTECTED] wrote: AttributeError: plone_javascripts.js Please ask on the plone-users list for Plone related issues. -aj pgpUXSKlvJCHB.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] (no subject)
If its not ZOPE hosting ... don't send it here!! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, January 03, 2001 2:00 AM To: [EMAIL PROTECTED] Subject: [Zope] (no subject) GET YOUR OWN 100 MEG WEBSITE FOR ONLY $11.95 PER MONTH TODAY! STOP PAYING $19.95 or more TODAY for your web site, WHEN YOU CAN GET ONE FOR ONLY $11.95 PER MONTH! DO YOU ALREADY HAVE A WEBSITE? ALL YOU HAVE TO DO IS TRANSFER THE DOMAIN TO OUR SERVERS AND UPLOAD YOUR DATA AND YOU ARE READY TO GO! YOUR NEW WEB SPACE CAN BE CREATED INSTANTLY WITH JUST A SIMPLE PHONE CALL TO OUR OFFICE. YOU CAN CHANGE THE DESIGN OF YOUR SITE AS MUCH AS YOU WANT with no extra charge! UNLIMITED TRAFFIC -- no extra charge! FRONT PAGE EXTENSIONS are FULLY SUPPORTED. A SET UP FEE OF $40.00 APPLIES for FIRST TIME CUSTOMERS. ALL FEES PREPAID IN ADVANCE FOR THE YEAR PLUS A $40.00 SET UP CHARGE. FOR DETAILS CALL 1 888 248 0765 if you are outside the USA, please fax 240 337 8325 Webhosting International ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
Robert Joseph Roos wrote: invalid attribute name, "manage_addproperty(name", for tag dtml-call manage_addProperty(name='foo', value='bar', type='string'), on line 10 of makeSched don't know if anybody helped you on this already, but any method call is an expression, and should be (pedantically) spelled: dtml-call expr="manage_addProperty(name='foo',value='bar', type='string')" hope that helps, -- -mindlace- Zopatista Community Liason ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] (no subject)
Hi Rob, I'm a newbie, but I just finished doing what you are trying to do. Here's how I did it: Product name: NewsItem ZClass: CNewsItem Property Sheet: NewsProperties In the BuildNews dtml method: dtml-call "REQUEST.set('ts', ZopeTime())" dtml-call "REQUEST.set('id', _.str(_.int(ts)))" dtml-with "manage_addProduct['NewsItem']" dtml-call "CNewsItem_add(_.None, _, NoRedir=1)" /dtml-with dtml-with "_.getitem(REQUEST['id']).propertysheets.NewsProperties" dtml-call "manage_changeProperties({ 'PostedBy' : REQUEST['PostedBy'], 'email' : REQUEST['email'], 'Title' : REQUEST['Title'], 'Content' : REQUEST['Content'], 'Expires' : REQUEST['Expires'], 'IconPath' : REQUEST['IconPath'], 'DetailURL' : REQUEST['DetailURL'], 'DetailDescription' : REQUEST['DetailDescription']})" /dtml-with dtml-call "RESPONSE.redirect(URL2)" Hope it helps. Eric. // I want to create a large number of properties for a Zclass. // My Zclass has a propertysheet named Schedule. // // I've tried stuff like this: // // dtml-with propertysheets // dtml-with common // dtml-with Schedule // manage_addProperty(name='foo', value='bar', type='string') // /dtml-with // /dtml-with // /dtml-with // // // The dtml-with's don't get an error, so I must be popping namespaces on // properly. But the manage_addProperty always results in: // // invalid attribute name, "manage_addproperty(name", for tag dtml-call // manage_addProperty(name='foo', value='bar', type='string'), on // line 10 of makeSched // // // =Rob== // J= // =Roos= ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
On 14 Jul 2000, Karl Anderson wrote: __bobo_traverse__ is another attribute that the object may have to drive the publishing process, but I haven't needed to understand why it's useful yet :) Isn't that where he'd hook in to do exactly what he wants? To have an (arbitrary) object "eat" subsequent URL elements as arguments to operate upon. Like ZSQLMethods do. I think there's a howto on this somewhere. And I think I remember reading that it was a lot easier to do under 2.2. --RDM ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
"Leichtman, David J" wrote: I've previously been a Perl programmer. I did a lot of stuff where I would have multiple links with different options. Ex. a href="/path/script.pl/1234"1234/abr a href="/path/script.pl/2345"2345/abr You can do this and more with a SiteAccess access rule and modifying the remaining traversal stack. It's a REQUEST variable but the name escapes me right now... However, I'm planning to do a PathHandler product to do just this as soon as I get to grips with Zope 2.2... cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
"Leichtman, David J" [EMAIL PROTECTED] writes: I've previously been a Perl programmer. I did a lot of stuff where I would have multiple links with different options. Ex. a href="/path/script.pl/1234"1234/abr a href="/path/script.pl/2345"2345/abr Then, in script.pl, I would pick up the extra info on the other side from $PATH_INFO. The problem in Zope is that there is no "end" to the address. Serving from Apache, it knows that the .pl extension is the end of the path. If there's a '/' and more after it, it will push it to PATH_INFO. So how do you do this in Zope? Because it's object names instead of paths in the request, how do you send optional, additional info through the request as above? You've answered your own question. There is no end in the middle of the path. The publisher picks off each part of the URL from the top down, and at each step, it asks that object if it can provide the next one. Look at traverse() in lib/python/ZPublisher/BaseRequest.py, or step through the publishing process - see http://www.zope.org/Members/michel/HowTos/TheDebuggerIsYourFriend. At each step, the publisher checks to see if the parent has the child as an attribute, and if so, continues with the object at that attribute as the parent (so long as other conditions are met, like permissions). You can see this in python products: class Foo: "a python product" ... index_html = HTMLFile("someDTMLFile", globals()) index2_html = "HEADBODY..." index3_html = aFunction(mood, phaseOfMoon) Since getattr(path.to.foo, "index_html") reaches that html file, ZPublisher.Zope("/path/to/foo/index_html") publishes that file. index_html could be a (badly named) method instead, which has other attributes. It could decide what to publish or how to allow the publisher to traverse the path programmatically. You don't need extra rules that look for foo.pl in the URL (what a kluge - enforce a perl script to sit there until URLs are no more!). For your example, script.pl could have two subobjects or other attributes, 1234 and 2345, and the default index_html. Or script.pl could be a ZClass with those three as DTML methods or other subobjects. __bobo_traverse__ is another attribute that the object may have to drive the publishing process, but I haven't needed to understand why it's useful yet :) -- Karl Anderson [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] (no subject)
This is a job for __bobo_traverse__ (yes, I know, unlikely name, but what has now become Zope used to be named Bobo). Without using __bobo_traverse__, which is defined as a method on the object which you access via traversal, you can't easily use "extra" URL elements as parameters to pass to the object. An sample __bobo_traverse__ method: def __bobo_traverse__(self, REQUEST, name): """ 'name' here is the remainder of the URL """ return self._data[name] It might be easier in your case if you're not used to python to construct your own Zope objects in which you can place a __bobo_traverse__ method to just use query string arguments instead, which are available through the REQUEST object. -Original Message- From: Leichtman, David J [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 13, 2000 2:27 PM To: '[EMAIL PROTECTED]' Subject: [Zope] (no subject) I've previously been a Perl programmer. I did a lot of stuff where I would have multiple links with different options. Ex. a href="/path/script.pl/1234"1234/abr a href="/path/script.pl/2345"2345/abr Then, in script.pl, I would pick up the extra info on the other side from $PATH_INFO. The problem in Zope is that there is no "end" to the address. Serving from Apache, it knows that the .pl extension is the end of the path. If there's a '/' and more after it, it will push it to PATH_INFO. So how do you do this in Zope? Because it's object names instead of paths in the request, how do you send optional, additional info through the request as above? I know there has to be a way to easily do this, I just can't figure it out. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] (no subject)
Thanks for responding so quickly. I'm not sure I understand. The problem here, and the reason I can't simply use a form or a session, is that I want to set a series of links that send different options to the same method. I guess it's the equivalent of passing args to a dtml method (which you can't do). It's the method I always used doing Perl. Adding stuff on to the URL is like the ghetto-style web-based ARGV. Well.. unfortunately, this isn't straight CGI nor Perl, and the URI namespace never "ends" in Zope. The way to pass args to DTML methods is via a form post or via a link with a query string (or a form get). The publisher "eats up" the rest of the URL and returns a Not Found error if you try to tack on indiscriminate things after a method name. Sorry. Your option is to write a custom object that handles this via __bobo_traverse__. I'm still not sure why you can't just do: a href="my/method?a=1"1/a as opposed to: a href="my/method/1"1/a I don't really get what __bobo_traverse__ is or how it would help. The problem isn't with grabbing stuff on the other end. If I can just get stuff to PATH_INFO, I can read PATH_INFO on the other side. The problem is that I don't know how to variably write PATH_INFO for different links. I know how to do it really easily in Perl. I would search the mail archives for __bobo_traverse__ if you want to know more. I'm not even sure if Zope exposes PATH_INFO in REQUEST. It might. I doubt it would help if it did, however. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
"Jay, Dylan" wrote: -Original Message- From: Marco Mariani [mailto:[EMAIL PROTECTED]] Sent: Friday, June 23, 2000 9:54 PM To: Jay, Dylan; [EMAIL PROTECTED] Subject: Re: [Zope] (no subject) On Fri, Jun 23, 2000 at 04:32:39PM +1000, Jay, Dylan wrote: It seems to me that a few tweaks to the dtml-if syntax would be beneficial something like the following would certainly clean up some of the logic I end up writing. dtml-if X a href="a_url" dtml-always link text dtml-else (no link currently available) dtml-then /a /dtml-if dtml-if X a href="a_url" link text /a dtml-else link text (no link...) /dtml-if yes but the repitition of "link text" could be a real pain if "link_text" is big. Repitition is always a maintance nightmare. If it is, make it a method or attribute. dtml-if X a href="a_url" dtml-var linktext/a dtml-else dtml-var linkText (No Link Available) /dtml-if X You could make the links objects, such that: dtml-in "objectValues('Link Object')" br a href="dtml-var linkURL" dtml-var linkText /a dtml-else p Sorry, no links available at this time. /dtml-if Link Objects The real question is why have link text that doesn't link... ;) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
Luc Tonin wrote: does anybody know how to have some statistic about each web pages under zope?? each pages is da result of query on a mysql database ! any id ??? thx by advance I don't know if this is what you mean, but you can use webalizer or another statistics package on the log file created by zope. If you run it behind apache, you can use the log file apache creates. hope that helps, -- ethan mindlace fremen Zopatista Community Liason ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] (no subject)
Jay, Dylan writes: ... Perhaps another example will prove its uglyness. dtml-if "REQUEST.has_key('some_value') and this().has_key(some_value) and _[some_value] == 'a property value' and AUTHENTICATED_USER.has_role('Manager')" a href="a_url" /dtml-if link text dtml-if "REQUEST.has_key('some_value') and this().has_key(some_value) and _[some_value] == 'a property value' and AUTHENTICATED_USER.has_role('Manager')" /a dtml-else (no link available) /dtml-if or dtml-if "REQUEST.has_key('some_value') and this().has_key(some_value) and _[some_value] == 'a property value' and AUTHENTICATED_USER.has_role('Manager')" a href="a_url" dtml-always link text dtml-else (no link currently available) dtml-then /a /dtml-if Now which looks cleaner? You could use "dtml-let" to avoid the (admittedly) ugly repetition of the condition. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] (no subject)
-Original Message- From: Marco Mariani [mailto:[EMAIL PROTECTED]] Sent: Monday, June 26, 2000 6:39 PM To: Jay, Dylan Subject: Re: [Zope] (no subject) On Mon, Jun 26, 2000 at 02:56:39PM +1000, Jay, Dylan wrote: dtml-if X a href="a_url" link text /a dtml-else link text (no link...) /dtml-if yes but the repitition of "link text" could be a real pain if "link_text" is big. Repitition is always a maintance nightmare. So is dtml-always. No thats not the same thing. If I have a complex expression for X and it needs to be changed then it will have to be changed in two places. If I forget to update it in both places I would create a bug. My proposal elegently avoids this problem. dtml-var "['A HREF=',''][not X]" link text dtml-var "['/A','(no link...)'][not X]" I've no idea about this syntax. Does it work? Yes it does. "not X" is the array index, 0 or 1. oic. Thats nasty. Actually you can just write that dtml-var "not X and 'A HREF='" which is a bit cleaner. -- "This company has performed an illegal operation and will be shut down. If the problem persists, contact your vendor or appeal to a higher court." - Signal11 on slashdot ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] (no subject)
-Original Message- From: Dieter Maurer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 27, 2000 3:31 AM To: [EMAIL PROTECTED] Cc: '[EMAIL PROTECTED]' Subject: RE: [Zope] (no subject) Jay, Dylan writes: ... Perhaps another example will prove its uglyness. dtml-if "REQUEST.has_key('some_value') and this().has_key(some_value) and _[some_value] == 'a property value' and AUTHENTICATED_USER.has_role('Manager')" a href="a_url" /dtml-if link text dtml-if "REQUEST.has_key('some_value') and this().has_key(some_value) and _[some_value] == 'a property value' and AUTHENTICATED_USER.has_role('Manager')" /a dtml-else (no link available) /dtml-if or dtml-if "REQUEST.has_key('some_value') and this().has_key(some_value) and _[some_value] == 'a property value' and AUTHENTICATED_USER.has_role('Manager')" a href="a_url" dtml-always link text dtml-else (no link currently available) dtml-then /a /dtml-if Now which looks cleaner? You could use "dtml-let" to avoid the (admittedly) ugly repetition of the condition. You could but this is something I end up doing a lot esp with the way hyperlinks work. Syntax to help would make it cleaner. It is not to much of a pollution of the name space as 'always' and 'then' would only be active inside an if statement. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] (no subject)
-Original Message- From: Shalabh Chaturvedi [mailto:[EMAIL PROTECTED]] Sent: Friday, June 23, 2000 5:19 PM To: Jay, Dylan; [EMAIL PROTECTED] Subject: Re: [Zope] (no subject) Hi: Could you give an equivalent using the current dtml tags? dtml-if X a href="a_url" /dtml-if link text dtml-if X /a dtml-else (no link currently available) /dtml-if The annoying things is that X has to be repeated which could be a large expression. The other option would be dtml-let cache_X="X" dtml-if cache_X a href="a_url" /dtml-if link text dtml-if cache_X /a dtml-else (no link currently available) /dtml-if /dtml-let but anyway you look at it its still uglier. - Original Message - From: Jay, Dylan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 23, 2000 12:02 PM Subject: [Zope] (no subject) Here's a feature I just submitted to the collector. It seems to me that a few tweaks to the dtml-if syntax would be beneficial something like the following would certainly clean up some of the logic I end up writing. dtml-if X a href="a_url" dtml-always link text dtml-else (no link currently available) dtml-then /a /dtml-if What do people think? I've not implemented it but I wouldn't imagine its very hard. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] (no subject)
-Original Message- From: Marco Mariani [mailto:[EMAIL PROTECTED]] Sent: Friday, June 23, 2000 9:54 PM To: Jay, Dylan; [EMAIL PROTECTED] Subject: Re: [Zope] (no subject) On Fri, Jun 23, 2000 at 04:32:39PM +1000, Jay, Dylan wrote: It seems to me that a few tweaks to the dtml-if syntax would be beneficial something like the following would certainly clean up some of the logic I end up writing. dtml-if X a href="a_url" dtml-always link text dtml-else (no link currently available) dtml-then /a /dtml-if dtml-if X a href="a_url" link text /a dtml-else link text (no link...) /dtml-if yes but the repitition of "link text" could be a real pain if "link_text" is big. Repitition is always a maintance nightmare. Now what's cleaner and easier to the eyes? Or for the obfuscated DTML context: dtml-var "['A HREF=',''][not X]" link text dtml-var "['/A','(no link...)'][not X]" I've no idea about this syntax. Does it work? :-) -- "This company has performed an illegal operation and will be shut down. If the problem persists, contact your vendor or appeal to a higher court." - Signal11 on slashdot ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] (no subject)
-Original Message- From: Dieter Maurer [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 24, 2000 8:11 AM To: Jay, Dylan Cc: '[EMAIL PROTECTED]' Subject: Re: [Zope] (no subject) Jay, Dylan writes: Here's a feature I just submitted to the collector. It seems to me that a few tweaks to the dtml-if syntax would be beneficial something like the following would certainly clean up some of the logic I end up writing. dtml-if X a href="a_url" dtml-always link text dtml-else (no link currently available) dtml-then /a /dtml-if What do people think? I've not implemented it but I wouldn't imagine its very hard. I am not in favor. It is only slightly shorter/more readable than the standard solution but requires two additional keywords. In standard Zope, your example reads: dtml-if X a href="a_url" /dtml-if link text dtml-if X /a dtml-else (no link available) /dtml-if Perhaps another example will prove its uglyness. dtml-if "REQUEST.has_key('some_value') and this().has_key(some_value) and _[some_value] == 'a property value' and AUTHENTICATED_USER.has_role('Manager')" a href="a_url" /dtml-if link text dtml-if "REQUEST.has_key('some_value') and this().has_key(some_value) and _[some_value] == 'a property value' and AUTHENTICATED_USER.has_role('Manager')" /a dtml-else (no link available) /dtml-if or dtml-if "REQUEST.has_key('some_value') and this().has_key(some_value) and _[some_value] == 'a property value' and AUTHENTICATED_USER.has_role('Manager')" a href="a_url" dtml-always link text dtml-else (no link currently available) dtml-then /a /dtml-if Now which looks cleaner? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
Hi: Could you give an equivalent using the current dtml tags? Thanks, Shalabh - Original Message - From: Jay, Dylan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 23, 2000 12:02 PM Subject: [Zope] (no subject) Here's a feature I just submitted to the collector. It seems to me that a few tweaks to the dtml-if syntax would be beneficial something like the following would certainly clean up some of the logic I end up writing. dtml-if X a href="a_url" dtml-always link text dtml-else (no link currently available) dtml-then /a /dtml-if What do people think? I've not implemented it but I wouldn't imagine its very hard. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
On Fri, Jun 23, 2000 at 04:32:39PM +1000, Jay, Dylan wrote: It seems to me that a few tweaks to the dtml-if syntax would be beneficial something like the following would certainly clean up some of the logic I end up writing. dtml-if X a href="a_url" dtml-always link text dtml-else (no link currently available) dtml-then /a /dtml-if dtml-if X a href="a_url" link text /a dtml-else link text (no link...) /dtml-if Now what's cleaner and easier to the eyes? Or for the obfuscated DTML context: dtml-var "['A HREF=',''][not X]" link text dtml-var "['/A','(no link...)'][not X]" :-) -- "This company has performed an illegal operation and will be shut down. If the problem persists, contact your vendor or appeal to a higher court." - Signal11 on slashdot ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
Jay, Dylan writes: Here's a feature I just submitted to the collector. It seems to me that a few tweaks to the dtml-if syntax would be beneficial something like the following would certainly clean up some of the logic I end up writing. dtml-if X a href="a_url" dtml-always link text dtml-else (no link currently available) dtml-then /a /dtml-if What do people think? I've not implemented it but I wouldn't imagine its very hard. I am not in favor. It is only slightly shorter/more readable than the standard solution but requires two additional keywords. In standard Zope, your example reads: dtml-if X a href="a_url" /dtml-if link text dtml-if X /a dtml-else (no link available) /dtml-if Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
On Tue, 6 Jun 2000, Alexandre A. Drummond Barroso wrote: We are posting e-mails about it on the list for a while and nobody answered, so I must think that nobody on Zope universe is using Oracle 8i (neither NT nor Linux Oracle 8i client). I installed DCOracle for a client using 8i. The only thing I recall having to do that wasn't in the instructions was getting a copy of a Setup file that worked with 8i, which I found posted to one of the Zope mailing lists. Other than that the installation was pretty simple, and the Zope part was completely trivial (install package, create connector, create ZSQL query, and go...) This was under Debian Linux. --RDM ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
At 2000-06-06 09:44 -0300, you wrote: You both had the same problem I have now: make Oracle 8i (in my case, Oracle 8.1.6) work with Zope. DCOracle is working well (Makefile attached to this message) but ZOracle isn't running yet. We are posting e-mails about it on the list for a while and nobody answered, so I must think that nobody on Zope universe is using Oracle 8i (neither NT nor Linux Oracle 8i client). There isn't any detailed documentation about it. The ZOracle installation instructions are simple but, in my opinion, incomplete. To solve this situation, I'm making a call to everybody that uses or wants to use Zope with Oracle 8i. My goal is finally document the installation process and make it work properly. Please contact me ASAP. Hello Alexandre. We intend to use Oracle 8i (8.1.5) with Zope (on another machine). We haven't done anything about it yet, though. That will hopefully change in the near future. I'd be interested to know what problems you had... David Trudgett ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )