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] 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] __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] 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] 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] 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] 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] 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] 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

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

2001-01-04 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Only if you add security declarations to expose functionality from xmlrpclib. Is that hacky and nasty? :-S In Zope 2.3, you place the following code somewhere that it will get executed at startup (a custom Product's __init__ is the best bet): from

[Zope-dev] 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] 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-dev] Import with INSTANCE_HOME?

2001-01-03 Thread Evan Simpson
From: BS [EMAIL PROTECTED] Can anyone tell me how to do a "from Products.ZPatterns import anything" when using INSTANCE_HOME? Do I have to add the INSTANCE_HOME path to sys.path? As long as Python has already imported Zope (i.e. you're in another Product) you don't need to do anything

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] 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-dev] Changing hostname and port without SiteAccess

2000-12-18 Thread Evan Simpson
From: Martin Winkler [EMAIL PROTECTED] I cannot use SiteAccess (because I need multiple ZCatalogs) To the extent that you can't use SiteAccess with ZCatalogs, you will also not be able to use any other solution (until ZCatalogs are fixed, hopefully in 2.3). The problem with ZCatalogs is not

[Zope-dev] 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] 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-dev] urllib not available in Python Scripts?

2000-12-17 Thread Evan Simpson
From: "Itai Tavor" [EMAIL PROTECTED] import urllib urllib.__allow_access_to_unprotected_subobjects__ = 1 Ok, this is simple enough, and it works. But... it opens access to everything in urllib. For now, the best way is to use a dictionary of names, like this: import urllib

Re: [Zope-dev] urllib not available in Python Scripts?

2000-12-15 Thread Evan Simpson
From: Itai Tavor [EMAIL PROTECTED] In Python Methods I could do urllib.quote(...). This doesn't work in Python Scripts. Is quote considered a security risk? No, but only the modules available to DTML are importable by default. You would need to provide security declarations in order to

[Zope-dev] 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] 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] 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] 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

[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] 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

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 @

[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] ZODB in a hosed state

2000-11-18 Thread Evan Simpson
From: "Bak @ kedai" [EMAIL PROTECTED] i'm not sure whre the bug lies. also, can anybody be so kind and point me to where i can check postgresql error Offhand, it looks like PostgreSQL is dying when ZODB tries to commit it. The log's location is system dependent -- on mine, it is at

Re: [Zope-dev] PythonMethods: Can't Slice context.REQUEST.PARENTS

2000-11-13 Thread Evan Simpson
From: The Doctor What [EMAIL PROTECTED] Using context.this().id, self.this().id, m_self.this().id all get me the same things: Folder, Zope, and my method. None give me the DTML Document foo_html. This would seem to be an important thing. The only information about your caller that you can

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,

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'

[Zope-dev] SiteAccess + ZCatalog Project

2000-11-07 Thread Evan Simpson
Those of you who use SiteAccess, or any other virtual hosting solution, with ZCatalog (including Squishdot, ZUBB, and other ZCatalog-dependent products) should check out this new project: http://dev.zope.org/Wikis/DevSite/Projects/ZCatalogVirtualHostFix This proposes a set of changes and an

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] Message exchange between distributed python code

2000-10-17 Thread Evan Simpson
From: Alexander Limi [EMAIL PROTECTED] -XML-RPC (is this lightweight enough? and is it easy to handle, and does it take care of the transport of the message too? What about C clients/servers?) I think what I want is maybe something like Java's RMI, but it should work with both Python and

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-dev] Help, please!!! __call__ problems with DTML templates

2000-10-10 Thread Evan Simpson
From: Stephen Simmons [EMAIL PROTECTED] 1.) How do you magically get the DTML context from 'dtml-var A' without having to resort to 'dtml-var "A(_,REQUEST)"' in the templates? A.isDocTemp = 1 # or make it a shared class attribute 2.) How to convert an arbitrary text string into rendered

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] SiteAccess2, Zope 2.2.2, __no_before_traverse__

2000-10-06 Thread Evan Simpson
From: Olivier Deckmyn [EMAIL PROTECTED] What is the new way to apply the "__no_before_traverse__" using SiteAccess2 Two ways, and it's factored so that you can turn SiteAccess objects off more selectively. First, you can turn all SiteRoots or Access Rules in your site off by restarting Zope

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] 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

[Zope-dev] Re: more __call__ ...

2000-09-26 Thread Evan Simpson
From: "Jim Fulton" [EMAIL PROTECTED] We are going to provide an alternate interface, so that if an object has a special method, then this will be called instead. okay... which proposal/project is this in? I don't remember. Evan? PythonMethods, essentially, unless you'd really like me

Re: [Zope-dev] Re: more __call__ ...

2000-09-26 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Evan Simpson wrote: PythonMethods, essentially, unless you'd really like me to make this a separate project. It's *such* a small change, tho. No, not at all, just where I can find some docs for this specific bit would be more than sufficient

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-dev] HiperDOM xmlc

2000-09-18 Thread Evan Simpson
From: Phillip J. Eby [EMAIL PROTECTED] [snip description] The effective external behavior of these two attributes, would be to let a web designer load and save any page or template they wished in the site, freely making changes to the header, footer, or various embedded elements thereof, and

Re: [Zope-dev] Adding functions to _

2000-09-18 Thread Evan Simpson
From: Itamar Shtull-Trauring [EMAIL PROTECTED] However, when I call the function, I get an error about DocumentTemplate, from which I discovered that when I call _.logvis('a_string'), instead of the string being passed as the first parameter, _ is passed as the first parameter to my function,

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] 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-dev] is INSTANCE_HOME broken on Win32?

2000-09-11 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] I'm trying to make Squishdot work with INSTANCE_HOME nicely. However, the testing is going wrong on a normal Win32 Install... I had lots of lines that went something like: f=open('%s/Products/%s.dtml' % (SOFTWARE_HOME,file)) Which generates:

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-dev] PATH_TRANSLATED delimted with backslash ?

2000-09-09 Thread Evan Simpson
From: "Steve Alexander" [EMAIL PROTECTED] obj = self.restrictedTraverse(REQUEST.PATH_TRANSLATED) This stopped working when I tried the software on Windows. Bug or feature? I'm not sure, but I'm *very* curious what you're trying to accomplish with this code. A better equivalent would

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] re module through the web security

2000-09-07 Thread Evan Simpson
From: Dan L. Pierson [EMAIL PROTECTED] Does this work for any module or just a semi-safe subset? How are submodules handled? Just put the full path in the ModuleSecurityInfo call? Can you grant permissions for all children of a parent module (scary!)?

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] 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

[Zope-dev] Re: Virtual Hosting in 2.2 - a Bestiary of Buglets

2000-09-05 Thread Evan Simpson
From: Itamar Shtull-Trauring [EMAIL PROTECTED] Problem 1: HTTP and HTTPS (more of a proxypass issue) === I want to be able to serve both http and https versions of a site from Apache. Problem is, because of the way proxying works, there is

[Zope-dev] Re: SiteAccess 2 Questions

2000-09-05 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] It looks like REQUEST.steps is the replacement for PARENTS? Is that so? Actually, REQUEST.steps has always been there -- it's the list of *ids* that were traversed. This may or may not correspond to the ids of the PARENTS, depending on whether an object

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] 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] 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] 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] 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

[Zope-dev] Re: /, XML, DTML syntaxgeddon

2000-08-18 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] I suggested the / thing to Steve who pointed out that dtml-/folder/object; is bad XML/SGML and so 'Not a Good thing (tm)' Yes, well, making DTML compatible with XML is explicitly *not* a current goal, although having ':' as an alternative separator should

[Zope-dev] Re: Acquisition ( slightly less Confusion ;-)

2000-08-17 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Ah, okay... so really, prettymuch all Zope objects should be wrapped with only one or two exceptions, most of which aren't actually objects as such but simple data types? Yes. Also, there is a very limited range of "natural" ways to construct the

Re: [Zope-dev] Still no safe seperators :P

2000-08-17 Thread Evan Simpson
From: "Chris Withers" [EMAIL PROTECTED] Looks like the colon it is then, there's even a patch now ;-) There a patch sitting around waiting for DTML syntaxgeddon which allows slash-separated paths in object names everywhere, not just in entity syntax. That could easily be extended to also allow

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

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-dev] Acquisition Confusion :S

2000-08-08 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] Who would be best to ask why it was set up the way it is? I'm sure there are very good reasons for it but the search order in all but the simple cases is very confusing and not as useful as it could be. How much more work would it be to implement the

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] 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-dev] Acquisition Confusion :S

2000-08-01 Thread Evan Simpson
From: Chris Withers [EMAIL PROTECTED] I still don't get this :( Here are the two and a half rules for deriving acquisition from a dotted expression: 1. A.B == (B o A), where A is an unwrapped object 2. (self o parent).B == a. (self.B o (self o parent)), if B is found in 'self' b.

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] 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,

<    1   2   3   >