Re: [Zope] SiteAccess smashes 'REQUEST.resolve_url(...)' in DTML ?

2000-05-19 Thread Evan Simpson
- Original Message - From: Martin Grönemeyer [EMAIL PROTECTED] dtml-with "REQUEST.resolve_url('http://mydomain/home/index_html')" dtml-var title /dtml-with throws Error Type: ValueError Error Value: Different namespace. REQUEST.resolve_url requires that the URL you pass to it

Re: [Zope] manage_users problem

2000-05-23 Thread Evan Simpson
- Original Message - From: Steve Drees [EMAIL PROTECTED] I have the following code stuffed away in a DTML Method dtml-call "REQUEST.set('name','steve3')" dtml-call "REQUEST.set('password','test')" dtml-call "REQUEST.set('confirm','test')" dtml-call

Re: [Zope] Moving the html_standard_header in an another folder...

2000-05-25 Thread Evan Simpson
- Original Message - From: Dan Rusch [EMAIL PROTECTED] Try this !--#var "Models.standard_html_header(_.None,_)"-- One important caveat to keep in mind here: If standard_html_header acquires any object or property that is meant to be context-sensitive (eg. it is defined in the root,

Re: [Zope] fmt weirdness

2000-06-06 Thread Evan Simpson
- Original Message - From: Chris Withers [EMAIL PROTECTED] dtml-var "_.DateTime()" fmt="%d %B %Y" ...works fine dtml-var "_.DateTime()" fmt='%d %B %Y' ...barfs with a 'Document Template Parse Error': The dtml parser only likes double-quoted attribute values. It sees the above as

Re: [Zope] How to catch URL in DTMLDocuments/Methods

2000-06-07 Thread Evan Simpson
- Original Message - From: Ian Sparks [EMAIL PROTECTED] The conceptual problem I have is that DTMLMethods/Documents don't have a parameters tag like SQLMethods do, so I don't see how I can "trap" parts of the URL like SQLMethods do and use them internally in my Method/Document. There

Re: [Zope] Property Question

2000-06-12 Thread Evan Simpson
- Original Message - From: Tom Scheidt [EMAIL PROTECTED] result = [] for item in self.objectValues( [ 'DTML Document' ] ): if item.hasProperty( 'publish' ): (and if there is something entered in the 'publish' field) result.append( item ) return result If you just meant,

Re: [Zope] Virtual hosts: How to make proper intra-site URL's?

2000-06-15 Thread Evan Simpson
- Original Message - From: Rob W. W. Hooft [EMAIL PROTECTED] I have set up a site: www.site In this site, there are a few virtual hosts: www.host1 -- www.site/Host1 www.host2 -- www.site/Host2 Thanks to a nice access rule, both the left and right names can be used to

Re: [Zope] Containment or context

2000-06-15 Thread Evan Simpson
I have paraphrased your example at http://www.zope.org/Wikis/zope-dev/AcquisitionFeedback We are considering providing some way for you to acquire properties in the way you expected. You can read more about this in the pages connected to the AcquisitionFeedback page. - Original Message

[Zope] SiteAccess 2.0.0b1 released

2000-06-16 Thread Evan Simpson
Finally, SiteAccess 2 for use with Zope 2.2b1 and up is ready. http://www.zope.org/Members/4am/SiteAccess2 Cheers, Evan @ digicool 4-am ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML

Re: [Zope] From where does nothing spring from?

2000-06-17 Thread Evan Simpson
- Original Message - From: "Graham Chiu" [EMAIL PROTECTED] dtml-var "REQUEST.set('error',f_Email.isNotEmail(f_Email,_))" where f_Email is an instance of the product, then the words 'None' are returned as well, and render to the screen. REQUEST.set returns None. You want to use

[Zope] SiteAccess 2.0.0 beta 2

2000-06-19 Thread Evan Simpson
Jacques A . Vidrine discovered a chunk of code I accidentally left where it didn't belong, which messed up the adding of SiteRoots. I've uploaded v2.0.0b2 to zope.org, but if you've already downloaded beta 1, you can fix your installation by just editing SiteRoot.py and deleting the lines of

Re: [Zope] scared

2000-06-20 Thread Evan Simpson
- Original Message - From: josh on [EMAIL PROTECTED] I have reinstalled zope and zodb, and copied the data.fs across. It was about two days old. All the changes that I had made were gone. Luckily I made a backup of my app yesterday by exporting it. I must have a bad understanding

[Zope] Re: [Zope-dev] SiteAccess in 2.0.0b2?

2000-06-23 Thread Evan Simpson
- Original Message - From: T.J. Mannos [EMAIL PROTECTED] I'm having trouble getting SiteAccess 2.0.0b2 to work with Zope 2.2.0b2. The first odd thing that happens is when I create a new SiteRoot, it says that this object already has a SiteRoot (which it doesn't), but creates it

Re: [Zope] ZODB performance: reads to writes

2000-06-24 Thread Evan Simpson
- Original Message - From: Jimmie Houchin [EMAIL PROTECTED] Will an app as described above still suffer from problems with high writes? Possibly, but only if there are hidden hotspots. For example, in your message-appending scenario, are these messages being added to the same Folder?

Re: [Zope] ZODB performance: reads to writes

2000-06-26 Thread Evan Simpson
- Original Message - From: Jimmie Houchin [EMAIL PROTECTED] This is what I understand based on your reply and from the paper by Jim. 1. That there are solutions currently being worked on by DC (implied). Yes, worked on does not mean 'Coming Soon to a Zope near You!' :) 2.

Re: [Zope] Adding Products Breaking Zope

2000-06-28 Thread Evan Simpson
- Original Message - From: Oleg Broytmann [EMAIL PROTECTED] My problem is with SiteAccess 1.0.1 with Zope 2.1.6 on Debian Unstable (Woody). Is it simply that this version of SiteAccess was written for an earlier version of Zope and is no longer compatible? Or am I just doing

Re: [Zope] Accessing .gif on disk with Python Product?

2000-08-07 Thread Evan Simpson
From: Martijn Pieters [EMAIL PROTECTED] misc_ is a root level object. Using absolute_url you are acquiring it into your Instance URL, which is not necessary (and will hamper off-server caching). Use dtml-SCRIPT_NAME; instead (which will give you the absolute url of the root object in all

Re: [Zope] Accessing .gif on disk with Python Product?

2000-08-08 Thread Evan Simpson
From: Martijn Pieters [EMAIL PROTECTED] I still think something else was broken, SiteAccess should (and does, as far as I know) stay away from SCRIPT_NAME. Yep. Environment/CGI variables are left alone by the virtual hosting machinery; only Zope-specific ones are altered. An example of a

Re: [Zope] Accessing .gif on disk with Python Product?

2000-08-08 Thread Evan Simpson
From: Martijn Pieters [EMAIL PROTECTED] SCRIPT_NAME will work in simple cases, but BASE1 ought to work in all cases, and using it is a better habit to have in general. We better file a Collector item on this then, as the current Zope Management Interface uses it still. Done. I also

Re: [Zope] JavaScript help!

2000-08-13 Thread Evan Simpson
function changeChars() { var box = eval("document.manage_edit_form.data:text"); This should be: var box = document.manage_edit_form['data:text']; JavaScript, like DTML, lets you access objects with funny names using subscript notation. Cheers, Evan @ 4-am digicool

Re: [Zope] How To Shoot Yourself In The Foot With Zope

2000-08-19 Thread Evan Simpson
From: "Jean Jordaan" [EMAIL PROTECTED] In order to get more debugging info about the environment I'm working in, I included 'dtml-var REQUEST' in my 'standard_html_footer'. This worked so nicely, I added 'dtml-var RESPONSE' too, arguing that the REQUEST is probably only half the story.

Re: [Zope] Odd problems with SiteAccess?

2000-08-19 Thread Evan Simpson
From: "Christopher Heschong" [EMAIL PROTECTED] I have a directory with a SiteAccess rule in it. Under that directory, versions and Zcatalogs no longer seem to work. Does your rule manipulate the traversal path? Versions and ZCatalogs have an unfortunate dependency (which needs to be

Re: [Zope] base instead of SiteAccess

2000-08-22 Thread Evan Simpson
From: "George Osvald" [EMAIL PROTECTED] I am using ProxyPass configuration with Apache and SiteAccess. [snip] The subdirectory of my web site is 'okstudio'. [snip] I was trying to use SiteAccess on my home machine but could not get it working. It would not work for http://localhost or

Re: [Zope] Problem with SiteAccess 1.0.1

2000-08-28 Thread Evan Simpson
From: William JOYE [EMAIL PROTECTED] I have some minor problems with SiteAccess 1.0.1 and Zope 2.1.6 + hotfix. 1. When click on the folder that contain SiteRoot, I need to enter again login and password. Why ? Most likely, because you have a Base set in your SiteRoot that differs from the

Re: [Zope] SiteAccess 2.0b3 missing setURL?

2000-08-28 Thread Evan Simpson
From: "albert boulanger" [EMAIL PROTECTED] An oversight or is there a change in API? Change in API; You want REQUEST.setServerURL, which is documented here: http://www.zope.org/Members/michel/Projects/Interfaces/ImplementingVirtualHo sts Cheers, Evan @ 4-am digicool

Re: [Zope] Silly string question

2000-09-01 Thread Evan Simpson
From: Satheesh Babu [EMAIL PROTECTED] I want to print the following line exactly as it appears on a web page (no HTML coding). !--#include file="header.inc" -- These aren't general solutions, but off the top of my head (tested): dtml-var expr=" '' "!--#include file="header.inc" --

Re: [Zope] Re: superuser confusion

2000-09-05 Thread Evan Simpson
From: "Chris McDonough" [EMAIL PROTECTED] On Mon, 4 Sep 2000, Chris Withers wrote: Well, okay, let me rephrase the question: Why is it bad for the bootstrap user to own anything? It used to be considered okay before Zope 2.2, so was has been changed/discovered that makes this now such a

Re: [Zope] That :method thingy.. where's it documented?

2000-09-05 Thread Evan Simpson
From: Brad Clements [EMAIL PROTECTED] Thanks but that's not really what I'm looking for. I thought there was a type ":method" that could be used as a way to call a method.. Perhaps I'm just going crazy. No, you're right, and the page Rik referenced really should be updated to include it.

Re: [Zope] re module through the web security

2000-09-06 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] One of Zope's key strengths is its granular security, right? So why isn't it the reponsibility of the site designer/maintainer/owner/whatever to ensure that only people he trusts have the ability to write DTML? Fear not. In the brand new shiny

Re: [Zope] re module through the web security

2000-09-07 Thread Evan Simpson
From: Dan L. Pierson [EMAIL PROTECTED] http://dev.zope.org/Wikis/DevSite/Projects/PythonMethods/GuardedImport I looked there. Ah, but I was sneaky and went and updated it just before posting ;-) You do have to follow a link or two, but it isn't hard to find (any more). Cheers, Evan @

[Zope] Call for Python Method opinions

2000-09-07 Thread Evan Simpson
If you want any say in how official Zope Python Methods work, I recommend heading over to: http://dev.zope.org/Wikis/DevSite/Projects/PythonMethods/StandardPythonMetho dModule ...soonest. If you have feedback on any part of the project, please contribute, but the link above is the squishiest

Re: [Zope] SiteRoot (SiteAccess) problem

2000-09-08 Thread Evan Simpson
From: Joshua Brauer [EMAIL PROTECTED] I'm running a new server with 2.2.1 and Siteaccess 2.0.0 b3 and I don't get a "SiteRoot" item in the available items list. I can copy site roots and move them, but I cannot create new site roots... After reinstalling SiteAccess ( restarting) I still have

[Zope] Re: Set Access Rule wish

2000-09-08 Thread Evan Simpson
From: Albert Boulanger [EMAIL PROTECTED] Its nice that the icon for the method, who is the access rule's target, is changed. However, I think also there needs to be some indicator on the folder involved as well. Unfortunately, the rule icon is already a fragile hack. If you copy, rename,

Re: [Zope] 'showREQUEST' or 'show_REQUEST' ?

2000-09-11 Thread Evan Simpson
From: Steve Alexander [EMAIL PROTECTED] I get an error when I try to add a DTML Method with REQUEST anywhere in the id. This is fruit of a needlessly broad restriction on REQUEST traversal, and is fixed in CVS. Cheers, Evan @ digicool 4-am ___

Re: [Zope] How to Pass values to a DTML method ??

2000-09-12 Thread Evan Simpson
Dieter Maurer You should include two positional parameters as well: dtml-var "some_method(_.None,_,param=value)" I've recently had explained to me a way that is more robust, and possibly less confusing, than this idiotic idiom. I think it may start appearing in docs and training. dtml-let

Re: [Zope] [zwiki] What is the 'Wiki-Safetybelt'?

2000-09-12 Thread Evan Simpson
From: "Jean Jordaan" [EMAIL PROTECTED] Wiki-Safetybelt: 968246577.617 What is is, and do I need to keep it if I want to ftp them back in? It's a weak protection for when two people grab a copy of a wiki page, edit it, then post their conflicting changed pages. When the second person

Re: [Zope] How to Pass values to a DTML method ??

2000-09-12 Thread Evan Simpson
From: Stuart Foster [EMAIL PROTECTED] The first example is what I was doing. But felt it was hard to follow. However I would be interested in why it would be considered more robust. I probably misused the word; what I meant was that the dtml-let form is less likely to have errors like

Re: [Zope] zope 2.2.1 and python 1.6

2000-09-13 Thread Evan Simpson
From: Nils Kassube [EMAIL PROTECTED] According to Guido van Rossum in http://linuxtoday.com/news_story.php3?ltsn=2000-09-07-011-21-OS-CY-SW you are not able to use GPL'ed Zope products with Python 1.6 (or 2.0) until the dispute is settled. No copyright-based licence whatsoever, including

Re: [Zope] trouble with SiteAccess; can't manage subtree mapped to inaccessible domain name

2000-09-23 Thread Evan Simpson
From: "Fred Yankowski" [EMAIL PROTECTED] How do I get out of this jam? I tried deleting the Products/SiteAccess folder, restarting Zope, and deleting the SiteAccess product from the Control_Panel/Products view, but now I'm getting an AttributeError when I try to access the subtree that has a

Re: [Zope] SiteAccess2 problem

2000-10-03 Thread Evan Simpson
From: Oliver Wrede [EMAIL PROTECTED] I am trying to use SiteAccess2 with a site which has imported SiteAccess1 objects. Have you used Extensions/updata.py to upgrade these objects? Cheers, Evan @ digicool 4-am ___ Zope maillist - [EMAIL

Re: [Zope] Zope with Apache

2000-10-06 Thread Evan Simpson
From: James Howe [EMAIL PROTECTED] We are running Zope behind an Apache server. We've got things configured so that it mostly works. However, we noticed that the "breadcrumbs" list at the top of a workspace screen doesn't work correctly. This was broken with respect to virtual hosting, as

Re: [Zope] Black Magic

2000-10-10 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Pierre-Julien Grizel wrote: It seems that in fact the DTML document doesn't actually pass _.None and _ to my object. WHY ?? This is deep voodoo that I don't fully understand. To me, it appears that what you get depends on how your __call__ was

Re: [Zope] REQUEST.set size

2000-10-10 Thread Evan Simpson
From: Paul Zwarts [EMAIL PROTECTED] ValueError: PQsendQuery() -- query is too long. Maximum length is 16382 This is purely a PostgreSQL issue; Some (all? not sure.) versions of PostgreSQL have a hard limit on the length of query strings. You have to break your query into multiple smaller

Re: [Zope] Black Magic

2000-10-10 Thread Evan Simpson
From: Fred Yankowski [EMAIL PROTECTED] The information you just provided about the DTML Method "call signature" and the like is very useful. Is this kind of reference material written down somewhere in a guide/how-to/wiki/...? The only thing I could find offhand is

Re: [Zope] Easiest way to turn X-Forwarded-For to Remote-IP?

2000-10-12 Thread Evan Simpson
From: Marcin Kasperski [EMAIL PROTECTED] X-Forwarded-For header (REQUEST['HTTP_X_FORWARDED_FOR']). Does there exist some sample of such usage? Can such a change be performed before authorization? You could do this with an Access Rule in your root folder, containing: dtml-call

Re: [Zope] Zope Apache/ProxyPass : environment variables

2000-10-31 Thread Evan Simpson
From: Aaron Straup Cope [EMAIL PROTECTED] Thanks. It appears, though, that there is no way to do this without appending a query string to the redirected URL. Is this correct? That, or mangling the URL in some way and then unmangling on the Zope end. If someone out there has any experience

Re: [Zope] ZMethod (Safe)

2000-11-08 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Now, how about internal/external? Safe and Flexible are probably more meaningful words there ;-) ZMethod is growing though ;-) We've pretty much settled on restricted/unrestricted here. In honor of the presidential

Re: [Zope] ZMethod (Safe)

2000-11-08 Thread Evan Simpson
From: Jason Cunliffe [EMAIL PROTECTED] Good news: 'ZMethod' is nice and 'sounds' good, however one says it. I agree, but then everyone around here thought that Zopelet was fairly unobjectionable, even though nobody really *liked* it. 1. 'closed' / 'open' 2. 'builtin' / 'custom' 3. 'local'

Re: [Zope] ZMethod (Safe)

2000-11-09 Thread Evan Simpson
From: Ron Bickers [EMAIL PROTECTED] Since you would normally *say* just ZMethod, I like the suggestion of using "Python ZMethod" and "Python ZMethod (Unrestricted)", vs. spelling out the (Restricted) in the first one. Good point. I'll shop this around and see what folks here think. Cheers,

[Zope] Python Script demo site

2000-11-22 Thread Evan Simpson
A few announcements. First, in the interests of sanity and getting things moving, I'm choosing the only name other than "Python Method" to get a positive score in the naming poll. I like it, Guido likes it, the community sort of likes it, so it's official. Zope 2.3 will introduce "Python

Re: [Zope] Python Script demo site

2000-11-26 Thread Evan Simpson
From: "Steinar Rune Eriksen" [EMAIL PROTECTED] Would it be useful to (or rather, is it possible to) let one of these scripts call up another one ? Sure. From one of the Python Scripts you just write something like: answer = context.otherscript(1.3, 'foo') ...where context is bound to the

Re: [Zope] Python Script comments

2000-11-26 Thread Evan Simpson
From: "Chris Withers" [EMAIL PROTECTED] Is there going to be a python methdos help tab eventually? Help is on the way. If I specify parameters 'wibble, fish', and then do: dtml-var "mypythonmethod('wibble',1)" ...will wibble='wibble' and fish=1 in the method? Yep. Parameters work

Re: [Zope] How to checkout PythonMethod from CVS

2000-11-26 Thread Evan Simpson
From: "Jochen Knuth" [EMAIL PROTECTED] Products/DC/PythonMethod at the moment, i don't know if the new name will result in a new directory. I expect to check it into the Zope2 core trunk under lib/python/Products/PythonScripts when I get back from Thanksgiving vacation. Cheers, Evan @

Re: [Zope] PythonScripts and ExternalMethods

2000-12-04 Thread Evan Simpson
From: Chris Gray [EMAIL PROTECTED] I notice that the CVS tree for Zope2 has incorporated (internal) PythonScripts and gotten rid of (external) PythonScripts. This leaves the old ExternalMethods but without the Bindings tab. Will External Methods eventually include this and present a form for

Re: [Zope] PythonScripts and ExternalMethods

2000-12-04 Thread Evan Simpson
From: [EMAIL PROTECTED] Are you talking about how the interaction between Zope and the programmer is performed? Are you talking about API? Or what? Both, and more. The details haven't even begun to be worked out yet, we're still brainstorming. In particular, are you talking about killing

[Zope] Important Fix for Zope 2.0 through 2.1.6

2000-12-10 Thread Evan Simpson
Thanks to Jeff Ragsdale, we've finally been able to kill a longstanding bug that allows POST requests to interfere with each other. Symptoms include corrupted or aborted File and Image uploads, and stupid-log messages about "AttributeError: data" killing threads. The attached HTTPServer.py is

[Zope] Important Fix for Zope 2.2.x

2000-12-10 Thread Evan Simpson
Thanks to Jeff Ragsdale, we've finally been able to kill a longstanding bug that allows POST requests to interfere with each other. Symptoms include corrupted or aborted File and Image uploads, and stupid-log messages about "AttributeError: data" killing threads. The attached HTTPServer.py is

Re: [Zope] Important Fix for Zope 2.0 through 2.1.6

2000-12-11 Thread Evan Simpson
From: "Hannu Krosing" [EMAIL PROTECTED] Could something similar be happening in PCGIServer too ? We are getting some weird and hard-to-reproduce errors when activity goes up and several file uploads are going on simultaneously? I'm not sure. I've peeked at the code, and the exact same bug

Re: [Zope] HTTPServer.py patch

2000-12-13 Thread Evan Simpson
From: Oleg Broytmann [EMAIL PROTECTED] I've got the patch from the mailing list. I saw only one replacement HTTPServer.py here - 13979 bytes in size. Looks like you've got the one that only works with Zope 2.0 - 2.1.6. If you're using Zope 2.2.0 or above, you need the other one. See

Re: [Zope] What version of Python Methods - no - Scripts for 2.2.4?

2000-12-13 Thread Evan Simpson
From: Ronald L. Roeber [EMAIL PROTECTED] Is the recommended install of Python Scripts for Zope 2.24 this? http://www.zope.org/Members/4am/PythonMethod even though it appears to be exactly one year old today (13-Dec)? Wow, I didn't realize today was its anniversary :-) No, this isn't the

Re: [Zope] Important Fix for Zope 2.2.x

2000-12-13 Thread Evan Simpson
From: The Doctor What [EMAIL PROTECTED] Will these be released as Hotfixes? Or just new versions? Or is this it? Hotfixes are pretty much reserved for critical security holes. Zope 2.3 (and possibly an interim 2.2.5 release) and above will have the fix. Fortunately, HTTPServer has had *very*

Re: [Zope] SiteAccess and Roles

2000-12-13 Thread Evan Simpson
From: The Doctor What [EMAIL PROTECTED] I tried both Owner and Manager roles in user_acl(2) but it doesn't work! Didn't work in what sense? They couldn't log in, or didn't get the access you expected? More access or less, or just weird? Cheers, Evan @ digicool 4-am

Re: [Zope] SiteAccess and Roles

2000-12-13 Thread Evan Simpson
From: The Doctor What [EMAIL PROTECTED] I tried both Owner and Manager roles in user_acl(2) but it doesn't work! Didn't work in what sense? They couldn't log in, or didn't get the access you expected? More access or less, or just weird? Cheers, Evan @ digicool 4-am

Re: [Zope] Difference between Methods and Scripts?

2000-12-14 Thread Evan Simpson
From: Hamish Lawson [EMAIL PROTECTED] I see that the latest version of the O'Reilly Zope book now talks about Python and Perl *Scripts*, but refers still to DTML and ZSQL *Methods*. Does this reflect some actual conceptual difference between a Script and a Method, or is it simply because of

Re: [Zope] IE5 / Medusa bug?

2000-12-14 Thread Evan Simpson
From: seb bacon [EMAIL PROTECTED] I imagine the fact that I can make it work by adding index_html is the most telling point, but it's not telling me anything ;) Leaving off index_html causes Zope to add a base href to the head. That's the only difference I can think of. Your page doesn't get

Re: [Zope] Python Method and builtin-functions

2000-12-18 Thread Evan Simpson
From: Sven Hohage [EMAIL PROTECTED] I'd like to use Python - Methods but I'm afraid that some builtin-functions are not implemented like type() or list(). This is true. If it is really a problem for you, you may wish to wait for Python Scripts. Another question is if the

[Zope] Product Authors: If you use ZCatalog, READ! (that means you, Chris W. :-)

2000-12-18 Thread Evan Simpson
From: The Doctor What [EMAIL PROTECTED] I would happy to, it looks like it does what I need (having siteaccess). However, I don't see a clear cut description what's changing and how. What needs to be done (in easy to understand language) to make sure it all goes smooth, etc. It's one step

Re: [Zope] Something missing in Python Methods

2001-01-02 Thread Evan Simpson
From: Curtis Maloney [EMAIL PROTECTED] What I want to know is, why can't Python Methods refer to anything not explicitly passed to them? I don't want to have to make everything that invokes the method have to know to pass it half a dozen objects. Isn't the idea of a method to be executed in

Re: [Zope] Lobbying (was: [Zope] html_quote in python methods?)

2001-01-03 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] dtml-call "somemethod(absolute_url()+urlquote(_.getitem(id))" Well, in Python Scripts at least, you can do:: from Products.PythonScripts.standard import special_formats url_quote = special_formats['url-quote'] return url_quote("OK?") It's not great,

Re: [Zope] Why pythonMethod forbids me cutting list?

2001-01-04 Thread Evan Simpson
From: Dirksen [EMAIL PROTECTED] These statements in python method: stock=[3,4] del stock[1] will cause this error: Error Type: Python Method Error Error Value: Forbidden operation DELETE_SUBSCR at line 2 How is that? Python Methods aren't smart enough to know that you created the list

Re: [Zope] Python script / python method problem

2001-01-04 Thread Evan Simpson
From: Lothar T.E.L. [EMAIL PROTECTED] I am having a problem with one of the examples in Chapter 12 of the Zope book. I am creating a new product called "Zoo Exhibit" comprising of a DTML method, a Python script and, of course, a factory. The Zope book examples are based on Zope 2.3, which

[Zope] Python Scripts update

2001-01-04 Thread Evan Simpson
Python Scripts have gone through a fair number of changes and bugfixes recently. They should now work properly as methods of ZClasses. When you download the source of a Python Script, the title, parameter list, and bindings are added to the source in the form of specially formatted comments.

Re: [Zope] What is python scripts?

2001-01-07 Thread Evan Simpson
From: "Dirksen" [EMAIL PROTECTED] Is that a product(can't find it in zope's product page) or a new version of python method? Where to download? Please point me to the right direction. It is the successor to Python Methods (although they can coexist happily), to be released in 2.3 (now in alpha

Re: [Zope] How to set a REQUEST variable inside a PythonMethod?

2001-01-09 Thread Evan Simpson
From: Juan Carlos Corua [EMAIL PROTECTED] REQUEST.update({'NoRows': 4}) and I tried: REQUEST['NoRows'] = 4 and I tried: REQUEST.set('NoRows', 4) That last one should have worked; The first two wouldn't. Do you get an error on the last one? Cheers, Evan @ digicool 4-am

Re: [Zope] Unidentified problem with SiteRoot

2001-01-09 Thread Evan Simpson
From: Kelvin Cheong [EMAIL PROTECTED] I have a problem which i suspect is site root's problem. Shouldn't be; Site Roots only affect the generation of URLs by the REQUEST, and by absolute_url. Cheers, Evan @ digicool 4-am ___ Zope maillist -

Re: [Zope] SiteAccess and 2.3.0a2

2001-01-10 Thread Evan Simpson
From: "Timothy Wilson" [EMAIL PROTECTED] I have Evan's excellent SiteAccess product installed on my 2.3.0a1 Zope Thank you. Now that SiteAccess is part of the Zope core, how should I handle the upgrade. Can I simply recompile? It's the same Product, with only cosmetic changes. If you're

Re: [Zope] type in python methods

2001-01-11 Thread Evan Simpson
From: Juan Carlos Corua [EMAIL PROTECTED] How can I compare the type of 2 variables in a python method? The instruction "if type(var1) == type(var2): " doesn't work. _.same_type(var1, var2) should do it. (Without the "_." in Scripts). Cheers, Evan @ digicool 4-am

Re: [Zope] importing string module in python METHOD - a problem that shouldn't be aproblemproblem

2001-01-13 Thread Evan Simpson
From: "Lee" [EMAIL PROTECTED] I have a Python method that needs to use the string module. In the method body I have the 'import string' statement but when I try it = As Shane mentioned, 'import' is only enabled in Python Scripts, but Python Methods pre-import all of the same modules as DTML,

Re: [Zope] ZClasses meet PythonScripts, sample request

2001-01-14 Thread Evan Simpson
From: "Jim Washington" [EMAIL PROTECTED] I am not working through that example, but the below is a start on what you seem to need. Let me know what you think. Thanks for the fine examples! I have only one nit to pick; When using Scripts in ZClasses, you will typically want to use 'container',

Re: [Zope] __setstate__ and acquisition

2001-01-20 Thread Evan Simpson
From: "Matt" [EMAIL PROTECTED] I am using __setstate__ to reload files into memory for objects of a product I have made. This all works nicely, as is it supposed to. The problem though is that the object seems not to know about its environment at that time __setstate__ is called on the bare

Re: [Zope] mailhost example problem

2001-01-22 Thread Evan Simpson
From: Michael Angelo [EMAIL PROTECTED] i am experiencing a strange problem with using the mailhost example on zope.com. Is your code indented the way it is in your email? I don't think dtml-sendmail and its contents should be indented, since the contents are meant to be the literal text of

Re: [Zope] VirtualHostMonster, PATH_INFO and absolute_url

2001-01-24 Thread Evan Simpson
From: Itai Tavor [EMAIL PROTECTED] 1. When accessing http://10.0.1.21/spam PATH_INFO is /VirtualHostBase/http/10.0.1.21:80/MySite/VirtualHostRoot/spam, which breaks any method that uses PATH_INFO (For example, the login form of LoginManager). Can this be fixed somehow? The Zope virtual

Re: [Zope] Add this to Wish list

2001-01-24 Thread Evan Simpson
From: Jerome Alet [EMAIL PROTECTED] Please could you include a button "Download Source" to the Python Script edition form ? Already done; There's a link in the paragraph below the text area, and above the upload form (in CVS). Cheers, Evan @ digicool 4-am

Re: [Zope] Did I miss some major change in Z SQL Methods ?

2001-01-24 Thread Evan Simpson
From: "Curtis Maloney" [EMAIL PROTECTED] A Z SQL Method ( Returner.sql.getDetails ) [snip] dtml-with "Returner.getDetails(Returner, User=12)" dtml-var fieldName /dtml-with You want either: dtml-in "Returner.getDetails(Returner, User=12)" dtml-var fieldName /dtml-in ...or... dtml-with

Re: [Zope] VirtualHostMonster, PATH_INFO and absolute_url

2001-01-24 Thread Evan Simpson
From: "Itai Tavor" [EMAIL PROTECTED] Great, thanks for the fix. It's fine in Zope 2.3b3. I should probably write a Howto for VirtualHostMonster, and ask the folks who've written the various fine SiteAccess-related Howtos to incorporate it. It really is a lot easier and safer to use than

Re: [Zope] VirtualHostMonster, PATH_INFO and absolute_url

2001-01-25 Thread Evan Simpson
From: Philip Aylesworth [EMAIL PROTECTED] I would appreciate that HOWTO. :) I am going to need virtual hosting for a project I am undertaking and don't even know where to begin. Is VirtualHostMonster part of SiteAccess (which I have just discovered when I did a search on zope.org)? Do I need

Re: [Zope] SiteRoot 2 errors

2001-01-26 Thread Evan Simpson
From: Stephan Goeldi [EMAIL PROTECTED] I want to add a SiteRoot to my domain subfolder. I installed a fresh Zope 2.2.5 and in the lib/python/Products folder I extracted SiteAccess-2.0.0b4-nonbin.tgz. After this I restarted Zope. When I click to Add SiteRoot, I get the following error message:

Re: [Zope] Acquisition Algebra; interaction of containment and acquisition is confusing

2001-01-26 Thread Evan Simpson
From: Fred Yankowski [EMAIL PROTECTED] for the very last case, "a.b.c.x". I just can't follow why the equivalent expression isn't x.__of__(a).__of__(c.__of__(b.__of__(a))) rather than the more complex answer given: x.__of__(a).__of__(b.__of__(a)).__of__(c.__of__(b.__of__(a))) You can

Re: [Zope] Acquisition Algebra; interaction of containment and acquisition is confusing

2001-01-26 Thread Evan Simpson
From: Fred Yankowski [EMAIL PROTECTED] Now, does that bother anyone besides me? Since acquisition is intrinsic and ubiquitous in Zope, shouldn't we be concerned that it is hard to control or predict? Keep in mind that it is only the *order after containment* that has this problem. For

Re: [Zope] PythonScript question

2001-01-27 Thread Evan Simpson
From: "Timothy Wilson" [EMAIL PROTECTED] Error Type: TypeError Error Value: argument 1: expected read-only character buffer, instance found [snip] input name="display_date:date" size="20" value=""/td [snip] D = string.split(display_date, '/') You are marshalling 'display_date' as a date, then

Re: [Zope] Python Methods can't construct literal dictionaries?

2001-01-28 Thread Evan Simpson
This is one of the shortcomings of Python Methods that Scripts eliminate. You can work around it by writing: x = {} x.update({y: z}) Cheers, Evan @ digicool 4-am ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope

Re: [Zope] porting from Python Methods to PythonScripts in 2.3.0; LoginManager too

2001-01-29 Thread Evan Simpson
From: "Fred Yankowski" [EMAIL PROTECTED] + Don't copy over SiteAccess and PythonMethods. + Delete the PythonMethods product from the Control_Panel/Products management folder. Will I have to manually convert each existing Python Method to a PythonScript, or are they essentially the same

Re: [Zope] porting from Python Methods to PythonScripts in 2.3.0;LoginManager too

2001-01-29 Thread Evan Simpson
From: "Jim Washington" [EMAIL PROTECTED] Standard caveats, YMMV, etc, but it does a quick pass on the Methods in the folder where it is and makes Scripts from them when you hit the 'test' tab, saving the old ones as methodname.old. Excellent! Thanks for writing and sharing this -- it looks

Re: [Zope-dev] Re: ZCatalog and Unique IDs

2000-05-25 Thread Evan Simpson
- Original Message - From: Chris Withers [EMAIL PROTECTED] who's the CTO? Jim Fulton, Chief Technology Officer. use paths instead of object monikers. Why not do both? Have an POID (CORBA style) to actually identify an object and then use paths of POIDS to identify stuff in a

Re: [Zope-dev] Problems with LoginManager form-based login

2000-05-26 Thread Evan Simpson
- Original Message - From: Phillip J. Eby [EMAIL PROTECTED] Been there, done that. Yours doesn't work either, btw. Well, actually, it does, it's just that it causes a memory leak because it leaves an unintended circular reference. We've got a version that fixes the circular

Re: [Zope-dev] Traversal Stuff

2000-05-31 Thread Evan Simpson
- Original Message - From: Chris Withers [EMAIL PROTECTED] What this offers is having a URL like: http://mysite.com/folder/object/some/parameters processed by the 'object' object with a parameter of '/some/parameters' or better still a 'URL objects' list as a parameter. This sounds

Re: [Zope-dev] SiteAccess in 2.0.0b2?

2000-06-23 Thread Evan Simpson
- Original Message - From: T.J. Mannos [EMAIL PROTECTED] I'm having trouble getting SiteAccess 2.0.0b2 to work with Zope 2.2.0b2. The first odd thing that happens is when I create a new SiteRoot, it says that this object already has a SiteRoot (which it doesn't), but creates it

Re: [Zope-dev] NASTY error. Why?

2000-07-10 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] dtml-call "REQUEST['where'][-1].manage_addFolder(id)" Error Type: TypeError Error Value: read-only character buffer, Python Method Looks like the 'id' of something along the line is a method rather than a string. Try "_.getitem('id', 1)". Cheers,

Re: [Zope-dev] getting request variables values

2000-07-20 Thread Evan Simpson
The value you're after is stored in the 'environ' section of the request. Unlike 'other' and 'cookies' keys, 'environ' keys can't generally be fetched as attributes or keys of REQUEST. You need to access them as REQUEST.environ['keyname']. Cheers, Evan @ digicool 4-am

Re: [Zope-dev] Acquisition Confusion :S

2000-08-14 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] - never expose a "bare" object, or even one with an incomplete context Why? You can get at it through aq_base anyway, surely? Only from unrestricted code. DTML and (CVS) Python Methods only let you access aq_parent. This only applies to objects that

  1   2   3   >