Re: [Zope] Stopping a
At 1/17/01 10:24 PM, Tres Seaver wrote: > > "Jonothan Farr" <[EMAIL PROTECTED]> wrote: > > I also submitted it as > > a patch to the distribution but it was refused. Something about a new > dtml-in > > implementation that I haven't seen materialize in the last 5 versions > or so. > >The sentiment against "DTML-as-scripting-language" also makes >introducing more control structures difficult to sell; I don't >buy that, myself, but have to listen to folks who do. Some 8 months ago, I thought "break" was missing from and wrote to this list. Within hours, clever solutions were suggested, the most impressive of which was Jonothan's patch mentioned above. I'm happy to see Tres saying that he doesn't buy the anti-DTML-scripting sentiment. To me, it makes little sense to create a language and then make it hard to use. Even less so when refusing an offered change that is more of a correction than it is an extension. Now just don't get me started on "_['index-whatever']" :-) -- Dennis Nichols [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] ???
At 1/16/01 06:49 PM, Edwin Martin wrote: >Hello, > >How can I use an undefined variable in an expression? > >I made a DTML document which gets parameters from the URL, >like "/nieuw?maand=1". > >But I also want it to work when no parameters are given. How about -- Dennis Nichols [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] Calling other frames (OT)
At 1/16/01 08:58 AM, Curtis Maloney wrote: >As for this frame problem... seems like you're voiding the best (IMHO) use of >frames, which is to prevent reloading of portions of the page. Otherwise I >just render all the objects into elements of an 'uber-table'... I agree with Curtis about frames providing the wonderful ability to reload part of the page without reloading and redrawing the whole mess. But... the frame most likely to be reloaded is the one with the content (as opposed to the navigation, advertisement, and other decorative frames) and if you don't reload the frameset then you can't bookmark that particular content. What to do about that? -- Dennis Nichols [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] log file.
At 1/11/01 12:25 PM, Oleg Broytmann wrote: >On Wed, 10 Jan 2001, Jason C. Leach wrote: > > Is the Zope log file in Common Log File Format? > >Yes. You can run every standard log files analyzer on it. Using analog (http://analog.cx) against my Zope 2.2.2 logs, I found that the standard analog definition of the Common Log File Format didn't exactly match the Z2.log format. Specifically, Zope produces a host address followed by a colon, which confused a few of analog's reports. I currently use the following in my analog.cfg file... LOGFORMAT (%S: %j %u [%d/%M/%Y:%h:%n:%j] "%j%w%r%wHTTP%j" %c %b "%f" "%B") LOGFORMAT (%S: %j %u [%d/%M/%Y:%h:%n:%j] "%j%w%r" %c %b "%f" "%B") -- Dennis Nichols [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] Design/DTML question
At 1/10/01 01:22 PM, Timothy Wilson wrote: >On Wed, 10 Jan 2001, Dennis Nichols wrote: > > Or, if you insist that dates flow down the columns like I do, you could > use > > this untested revision of Max's solution > > >This doesn't seem to work. The if statement only evaluates to true the first >time through the loop. Because the objects in the loop had no 'id' attribute? In any case, here's a complete tested example: -- Dennis Nichols [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] Design/DTML question
At 1/10/01 04:44 PM, Max Møller Rasmussen wrote: >From: Timothy Wilson [mailto:[EMAIL PROTECTED]] > > >Right now, I've got the dates stored in a TinyTable. I can iterate through > >that list and generate the links, but I can't figure out how to display the > >table in two columns. > > Or, if you insist that dates flow down the columns like I do, you could use this untested revision of Max's solution: Gosh, wouldn't it be nice to have a sequence-midpoint ? But then somebody would surely want a sequence-first-quartile and so on :-) -- Dennis Nichols [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 )
[Zope] IEMethod (was: Can Zope ... )
At 1/9/01 08:33 AM, Olaf Zanger wrote: >Smith Ray schrieb: > > > * Allows non technical people to create content plus add users / managers > > etc without any HTML knowledge or knowledge outside of the package. >product: IEMethod >wysiwyg even in internet explorer. >really great! check it out I give up, what and where is IEMethod? Zope.org search turns up nothing. -- Dennis Nichols [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] Newbie Questions
At 1/8/01 02:32 PM, Alex Reid wrote: >- I am creating a 'form' method so I don't have to create separate forms for >INSERT and UPDATE actions. This works, only how do I tell Zope to ignore the >fact that doesn't exist when in INSERT mode? It is >there in the value="" parameter for the edit mode to pre-populate the >element. -- Dennis Nichols [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 )
[Zope] why I don't use popen2 any more
In the for what it's worth department... Using Linux (RH 6.2), Zope 2.2.2, Python 1.5.2 I wanted to run a unix command from my External Method that I wrote using Python. Digging around in Zope archives and other sources, I came up with a method that worked, of which this is a fragment: import popen2 (r, w) = popen2.popen2('somecommand') w.write(commandinput) w.close() s = r.read() r.close() However, this had the nasty side effect of leaving processes around. I discovered one instance on the web of someone having this same problem using Python but not Zope-related. No solution was given. I *think* the really bad thing about these processes (called zombies?) is that they may have certain resources, such as files, held open. And they are said to stay around until the process that created them dies itself. The fix seems to be easier than the original solution. Replace all of the above with import commands s = commands.getoutput('echo ' + commandinput + ' | somecommand') Presto, no more defunct processes. Hopefully a more stable Zope. Keen observers will note the security risk if commandinput contains arbitrary input from users. Wasn't true for me but it might be for you. A curiosity: the description in Python Essential Reference says getoutput uses os.popen2() to execute the command, but I was too lazy^H^H^H^H busy to investigate further. -- Dennis Nichols [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 )
[Zope] The inverse of REQUEST.set is ??
I can do Having done that, I'd like to be able delete 'something' and I do NOT mean just I want it gone! Come on, humor me... is there a good way to do this? -- Dennis Nichols [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 )
[Zope] Re: DC and the PTK?
At 11/29/00 03:42 PM, ethan mindlace fremen wrote: >Dennis Nichols wrote: > >>At 11/28/00 11:34 AM, albert boulanger wrote: >> >>>Whether to go with portal products from Plumtree or iPlanet. >> >>If this implies that you are considering using Zope's PTK, then you >>should be aware of this: You can *not* get commercial support from >>Digital Creations for PTK because PTK is not a released product. If you >>think you may need such support before PTK gets to 1.0, then you had >>best not use the PTK. But that's no reason to not use the rest of Zope. > > >This needs to be clarified. We actively do consulting with the PTK. >If you want to enter into a consulting contract with Digital Creations >that involves the PTK, that's not a problem. > >If you decide you want to use the PTK yourself, there exists a mailing >list and a product tracker. (see http://www.zope.org/Products/PTK ) The >PTK is under heavy development and is not a full release yet, so that does >need to be taken into account if you wish to use it yourself. What Ethan says, however true it may be, is contrary to my experience. I worked on developing a site based on PTK for several months and was within a month of going live, but had problems I could not solve, either alone or with the help of the mailing lists. I contacted DC via email, explained what my problems were, and asked how to arrange for consulting time. That was 11 weeks ago, on 10 Sept 2000. The very next day I received an email from Gary Graham ([EMAIL PROTECTED], Director, Sales & Marketing) stating: "PTK is a 0.01 release and not commercially supported yet. Zope is commercially supported yet. Zope.org is the best PTK source at present until we are able to release a commercially supportable version." Of course, PTK wasn't a 0.01 release at that point, but the message was clear. That caused me to (a) look for a substitute not using Zope, of which I found nothing worth considering, and (b) expend an extra two months redeveloping the site, still using Zope but not using the PTK. This caused substantial lateness in the project launch as well as considerable additional expense. As you might imagine, I was none too pleased at not being able to obtain consulting in September. To hear that consulting really was available isn't about to make me any happier! So Ethan, what is the story here? -- Dennis Nichols [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] Factoids for supporting zope
At 11/28/00 11:34 AM, albert boulanger wrote: >From: "Chris McDonough" <[EMAIL PROTECTED]> > > Ah. Well, my opinion is that it'd be fairly dangerous to make the > assertion > > that (as great as they both are) Zope and the Zope community can "make up > > for" the other half of the capital they need to develop the software they > > want. So what's the decision they're trying to make? Whether to > develop at > > all? > >Whether to go with portal products from Plumtree or iPlanet. If this implies that you are considering using Zope's PTK, then you should be aware of this: You can *not* get commercial support from Digital Creations for PTK because PTK is not a released product. If you think you may need such support before PTK gets to 1.0, then you had best not use the PTK. But that's no reason to not use the rest of Zope. -- Dennis Nichols [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 )
[Zope] Zope, squid, the Host header
The "How-To: Configuring Squid as an Accelerator for Zope" (http://www.zope.org/Members/htrd/howto/squid) by htrd doesn't entirely work for me and/or is over my head! My goal is to use Squid as an http accelerator in front of zope (using zserver, no apache) on the same machine. Secondary goal is to be able to access Zope directly also, but this is much less important. An alternate How-To by itamar (http://www.zope.org/Members/itamar/Squid) requires the use of SiteAccess, which I would like to avoid. Squid seems to be running OK (listening on port 8070, connecting to zope on port 8080) but wrestling with zope about the Host header has not yet produced a winner. Specifically, the How-To says: "If you will be always be accessing this Zope server through the accelerator then the easiest solution is to configure Zope to ignore the value of this header. Specify HTTP_HOST=www.myhost.com as either a command-line parameter to z2.py, or as an environment variable." I translate this to mean I could set and then export an environment variable that in my case would be HTTP_HOST=www.myhost.com:8070 since that's where the server should appear to be to the browser client. For whatever reason, this is not effective. I can tell because zope still works fine directly on port 8080 (through port 8070 I get the requested document, no images, and the baseref is still at port 8080). Inspection of HTTPRequest.py shows that it does a if have_env('HTTP_HOST'): host = strip(environ['HTTP_HOST']) hostname, port = splitport(host) and sees www.myhost.com:8080. Specifying the HTTP_HOST= on the command line has the same (non-) effect. I'd be pretty happy if I got either of those to work. I'd be even happier if I got the following to work, also quoted from the htrd How-To: "A better solution is to get Squid to rewrite the header to the correct value: 1. Compile squid using --disable-internal-dns. 2. Add a mapping from the name of your public server to the IP address of your Zope server in /etc/hosts 3. If you are running the Zope server on the same machine as the accelerator then: 1. Change the http_port line in squid.conf to bind only on the public network interface. 2. Use the -w switch to Z2.py to get Zope to bind to different network interface (possibly a loopback interface). Remember to change httpd_accel_host in squid.conf too. (Thank you to Henrik Nordstrom for showing me that solution.)" But I really don't understand this method... 1. OK, I know how to do the compile 2. /etc/hosts seem to map the other way, from the IP address of whatever to a name and some aliases. Does this mean that I should have a line 111.222.111.222 myhost.com myhost or is something else implied. 3.1 meaning "http_port myhost.com:8070" ? 3.2 this means? All help sincerely appreciated. -- Dennis Nichols [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] DTML source
At 11/23/00 01:38 PM, Tom Deprez wrote: >Are there some sites which publish there DTML source(structure)? I'm >particulary looking on how several navigation, menu, ... structures are >implemented in Zope. I use the following DTML Method (probably shouldn't be done in dtml) to produce a vertical, indented menu where folders are expanded to subfolders only if you're in one of the subfolders. Three custom folders are used to build the site (Category-Top, Category-Middle, and Category-Bottom). Each folder has a menu_entry property. A folder appears in the menu only if its menu_entry is non-blank. If you are currently in Pop Culture/Reviews/Books, the menu looks like this: Ask the Experts College Pop Culture Quiz Reviews Books Movies Music Trends Sports Here's the dtml. It's called display_menu and is recursive. Replace home_id_here with the id of the site's base folder. The base folder does not appear in the menu display. 0"> &dtml-menu_entry; Not my finest piece of coding, but maybe it will help. -- Dennis Nichols [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] Pseudo E-Mail Address validation
At 11/21/00 04:27 PM, Martin Winkler wrote: >For a subscription tool of a mailing list I'd like to quick-check the >e-mail address our users type. As a check on whether an email address *looks* OK, I use the following External Method. If ICANN really approves TLDs that are other than 2 or 3 characters long then the {2,3} will have to be changed. Warning: Some mail software between you and me may break up lines in the code. There are two executable lines, one starts with "m =" and the very next line starts with "return". There are no blanks in the r'...' string. import re def wellformedEmail(self, address): """ return true if email address appears to be well formed """ m = re.search(r'^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z][0-9a-z-]*[0-9a-z]\.)+[a-z]{2,3}$', address, re.IGNORECASE) return m != None and m.group() == address -- Dennis Nichols [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] overriding manage_beforeDelete in a CatalogAware Product
At 11/17/00 09:04 AM, Andy McKay wrote: > > But I'm confused about how to get rid of the index entry upon delete... >You should just be able to do "self.manage_beforeDelete(..)" since you have >inherited all CatalogAware's methods. Make sure you have CatalogAware as >your first (left most) item in your classes inheritance. This might be right, but I didn't try it because next Andy said: >Do you really need to set the catalog again? Isnt that already set in your >class? I think I get a big "Well, duh!" here. Of course, if I do a "self.manage_editCataloger(...)" in my product's __init__ routine, that sets the catalog for the rest of the object's existence, not just the __init__ routine. And so I don't have to set it again in any edit routine, nor do I have to worry about the object's deletion. Tested and working. Many thanks. -- Dennis Nichols [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 )
[Zope] overriding manage_beforeDelete in a CatalogAware Product
I think I need help in overriding the manage_beforeDelete method from CatalogAware. Just to be sure I'm asking the right question, here's the background: I have a Product (in Python, not TTW) whose instances get cataloged in a separate ZCatalog called CommentCatalog. My product's class inherits from CatalogAware and other classes and can successfully index itself by calling thusly in the __init__ routine: self.manage_editCataloger('CommentCatalog') self.index_object() Reindex also works just fine. But I'm confused about how to get rid of the index entry upon delete. I think I need to set the catalog name and then call the inherited manage_beforeDelete routine. So I tried this: def manage_beforeDelete(self, item, container): "Be sure we unindex ourselves from our special catalog" self.manage_editCataloger('CommentCatalog') self.CatalogAware.manage_beforeDelete(item, container) Not too surprisingly, the code throws an "AttributeError: CatalogAware" into the Stupid Log File and doesn't remove the object from CommentCatalog. Of course I don't understand what the correct incantation is, so I'm appealing for guidance. Zope 2.2.2, Python 1.5.2, RH 6.2, etc Thanks! -- Dennis Nichols [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 )
[Zope] re-releasing mysqlUserFolder 0.5 ??
[EMAIL PROTECTED], vladap (who is listed as the author) - Just before zope.org's Data.fs developed that short circuit a day or two ago, there was a new revision of mysqlUserFolder released (0.5.0 if I remember correctly). I'd like to try it out if we could get it back on the Zope site. -- Dennis Nichols [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] Zope.org down?
At 11/1/00 03:22 PM, Phil Harris wrote: >Subject says it all Well, not here but it does seem to have fallen back one or more days. I'm also curious about the zope.org site performance. Zope is said to capable of a million hits per day on commodity hardware, yet zope.org receives only about 20% of that on its busiest days. This would not be remarkable except that the response times from zope.org seem to usually be 10 seconds or so. I am on a T-1 line and 13 hops and 80ms from the zope.org server. -- Dennis Nichols [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] Re: [Zope-book] Re: [Zope] Zope Book Beta
At 10/31/00 11:08 PM, Wolfgang Strobl wrote: >For example; I have HTML help versions _and_ printed copies of >the - outdated - Zope docs, and one of each from the actual >howto-collection, and I'm using them both. Wolfgang - How about putting up your HTML help version of the howto-collection? That would be very cool. Thanks! -- Dennis Nichols [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] Hosting?
At 10/26/00 03:39 PM, J. Atwood wrote: >Try http://www.rackspace.com. > >You can start off with a 600 MHz, 128 MB Ram, 30 GB EIDE drive for about >$300 a month. They have great support and bandwidth and claim to be the >largest installed base of RH Linux. They also scale pretty well. I have >about 10 boxes with them for about year now. Although attractive at the low end, the rackspace price seems to jump rapidly. Move to a dual processor, 512MB, weekly backup and you arrive at a price about double what DellHost charges. So we're currently trying DellHost (which is somehow linked up with Interliant). While it is too early to give satisfaction rating, DellHost was not too swift administratively getting the server set up initially and we've had some bandwidth/connectivity issues. -- Dennis Nichols [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] how to include Flash/SWF objects in Zope website?
At 10/16/00 02:21 PM, Fred Yankowski wrote: >Thank you both for the help. File objects are just the ticket (but it >turns out that Image objects work nearly as well). For the record, >here's what I did: In order to provide alternate content and/or detect which level of Flash player is present, you might want to also include the free Moock "fpi" (f.lash p.layer i.nspector) found at http://www.moock.org/webdesign/flash/detection/moockfpi/ -- Dennis Nichols [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 )
[Zope] fmt=structured-text seems wrongish
Not to throw stones, just trying to understand. WRT It makes sense to me to use "fmt=something" when the something is an instruction on how to format a number or how to format the time. In those cases, I'm simply saying how I want the number or time to appear. But when I say "fmt=structured-text" then I'm saying how the item is stored. Let's say that I've developed a Python product that contains description and now I've made an instance of it as myDoc. Within my site (application), I can ask that description be rendered this way... By doing so, I'm telling Zope that whatever it finds in myDoc.description should be interpreted according to structured text rules from markup contained within myDoc.description itself. Now how does my application know that the myDoc object has structured text stored in description? Shouldn't the object itself know that? And shouldn't the fmt specification tell how myDoc.description is to be presented instead of how it is stored? For example, let's say I can choose to store description as plain text, as structured text, or as html. Regardless of how it is stored, I might want to ask for it as: fmt=raw in case I want to edit it fmt=html in case I want to send it to a browser and so on. Here, raw and html don't describe how to interpret the contents of myDoc.description, just how to give it back. Pointers? I guess I can just fix this within my own product(s) by returning various fields in a manner something like this: Stored as STX, return as HTML return str(StructuredText.HTML(self.description)) Stored as STX, return as raw, or stored as HTML, return as HTML return self.description and so on... -- Dennis Nichols [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 )
[Zope] AUTHENTICATED_USER (or something) making me crazy
If I inspect REQUEST by inserting a in my dtml I can see that AUTHENTICATED_USER is set to Anonymous User. Yet when I insert the following code, it never displays Guest. It takes the else branch and then, perversely, displays Anonymous User. Please point out my stupid mistake. Guest Thanks. Maybe I shouldn't work on Saturdays. Zope 2.2.2 roughly, Python 1.5.2, RH 6.2 -- Dennis Nichols [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 )
[Zope] BTreeFolder (easy?) questions
1. Can I blithely use BTreeFolder in place of Folder without loss of functionality? 2. Can I successfully inherit from BTreeFolder in ZClasses (assuming that I uncomment registerBaseClass, which has been commented out in all BTreeFolder versions so far)? -- Dennis Nichols [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 )
[Zope] Site Access and UserFolders in love?
Since the standard root User Folder seems to hate being replaced by other much-needed-by-me types of UserFolders, I wondered if this would work well (using only ZServer) ... 1. Use SiteAccess to map mysite.com/ to mysite.com/my/ for all users and sub-managers. 2. Put a {MySQL,etc,smb,...}UserFolder in /my for all users and sub-managers. 3. Use SiteAccess to map big-guy.mysite.com to mysite.com/ for the site manager. 4. Use the standard root UserFolder only for the site manager login (index_html could redirect any errant users). This would seem to keep those "other" UserFolders out of the root and allow the site manager to easily get at the manage views in the root. I'm sorry to ask, but I've found that it takes me a long time to work through setting up and trying such things, and then not always knowing if it is sound or if I'll find the fatal flaw tomorrow. Anybody tried this? Or have an opinion on its soundness? -- Dennis Nichols [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] can I suppress newlines/whitespace in DocumentTemplates?
At 9/19/00 03:11 PM, Skip Montanaro wrote: >I'd like to structure my DTML so it is vaguely readable: > > > > - > > >This means inserting newlines and doing some indenting. Unfortunately, >since I'm generating plain text, the newlines and indentation count (unlike >with HTML)... Even in HTML, the indents and newlines count by showing up as a space before the '-' in the above example. You can fix this with good readability simply by "delaying" the closing '>'. For example, - -- Dennis Nichols [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] restrictedTraverse - yay! :-)
At 9/15/00 10:05 AM, Chris Withers wrote: >So: > > > >will work as I expect it to? Well, I don't know what you expect :-) When I try to save such a construct with the handy-dandy Change button I get Document Template Parse Error Invalid attribute name, "absolute_url", for tag ... -- Dennis Nichols [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 )
[Zope] Indirection, acquisition, asphyxiation
I'm having trouble using the value of a property to determine which object to render (Zope 2.2.1, if it makes any difference). Starting from the beginning, let's say I have two folders A and B with four DTML methods (Nilo, Alpha, Smalpha, and Bravo): / Nilo /A Alpha Smalpha /B Bravo From Alpha, I can render Nilo, Smalpha, and Bravo by using this dtml: (or ) (or ) (not !) OK, now I want a property of folder A, call it 'choice', to determine what should be rendered by Alpha. So I rewrite Alpha to include: either or These work nicely if I set 'choice' to 'Nilo' or 'Smalpha' but I don't see how to make either one work for Bravo! Setting 'choice' to 'B.Bravo' gives me: Error Type: KeyError Error Value: B.Bravo How do I get this to work for Bravo (and still keep it working for the other cases)? Clearly my zen needs some tending to. -- Dennis Nichols [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] Underscore Caracter
At 9/5/00 09:54 PM, Chris McDonough wrote: >It should be noted that _.string.replace() is not mentioned in the DTML >reference guide. If it exists, it should be used. Sigh. I can't wait >for the Zope Book to come out, I'm going to be the first buyer. ;-) Not that I would expect it to exist, but according to "Python Essential Reference" p. 117, it is indeed present in the string module: replace( str, old, new [,max] ) -- Dennis Nichols [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] zope as program
At 09:19 PM 6/13/00 -0500, Malcolm C. Mallette wrote: >Zope is the worst excuse of a program I have ever encountered. Ahhh, now we're getting some place. Zope's learning curve can be _very_ steep (depending on one's experience), but every day that I work with it, I am amazed at what can be accomplished and how it can be extended. As a counter example, I've used PHP since it was PHP/FI and found it an order of magnitude easier to learn. But it would take me forever to use PHP to publish content the way I can with Zope. Zope = harder to learn, much bigger rewards. -- Dennis Nichols [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 )