Re: [Zope-dev] getting request variables values
Chris Withers wrote: Evan Simpson wrote: 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']. Heh, I thought so, I presume REQUEST.get won't get out of environ either? I posted this in the collector and was told it behaved as expected (and would suck the key out of any of the sub-dictionaries) What's the real story? ;-) I'm looking at 2.2.0final. From the comments in the code, it *ought* to look in the environment first. def __getitem__/__getattr__ from HTTPRequest.py: """Get a variable value Return a value for the required variable name. The value will be looked up from one of the request data categories. The search order is environment variables, other variables, form data, and then cookies. """ However, looking in the code, it starts off by looking in "other", and doesn't look in "environ" at all. I suggest a patch to go right after the method's docstring: def __getitem__(self,key, default=_marker, # Any special internal marker will do URLmatch=regex.compile('URL[0-9]+$').match, BASEmatch=regex.compile('BASE[0-9]+$').match, ): """Get a variable value Return a value for the required variable name. The value will be looked up from one of the request data categories. The search order is environment variables, other variables, form data, and then cookies. """ #" + environ=self.environ + if environ.has_key(key): + return environ[key] other=self.other if other.has_key(key): if key=='REQUEST': return self return other[key] -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] getting request variables values
Steve Alexander wrote: However, looking in the code, it starts off by looking in "other", and doesn't look in "environ" at all. I suggest a patch to go right after the method's docstring: def __getitem__(self,key, default=_marker, # Any special internal marker will do URLmatch=regex.compile('URL[0-9]+$').match, BASEmatch=regex.compile('BASE[0-9]+$').match, ): """Get a variable value Return a value for the required variable name. The value will be looked up from one of the request data categories. The search order is environment variables, other variables, form data, and then cookies. """ #" + environ=self.environ + if environ.has_key(key): + return environ[key] other=self.other if other.has_key(key): if key=='REQUEST': return self return other[key] Ok... I was wrong :-/ A bit later we have: if isCGI_NAME(key) or key[:5] == 'HTTP_': environ=self.environ if environ.has_key(key) and (not hide_key(key)): return environ[key] return '' I was only sort-of wrong though :-) The code certainly doesn't stick exactly to its docstring. The "other" dictionary is seached first, then URLx where x is a number. Then "environ" is searched, but *only* if the key begins with 'HTTP_' or is in the following list: SERVER_SOFTWARE, SERVER_NAME, GATEWAY_INTERFACE, SERVER_PROTOCOL, SERVER_PORT, REQUEST_METHOD, PATH_INFO, PATH_TRANSLATED, SCRIPT_NAME, QUERY_STRING, REMOTE_HOST, REMOTE_ADDR, AUTH_TYPE, REMOTE_USER, REMOTE_IDENT, CONTENT_TYPE, CONTENT_LENGTH, SERVER_URL Looking in Leonardo's sample environment, a posted to this list, there's a lot of keys that won't get matched: SSL_* HTTPS_* REMOTE_PORT SERVER_ROOT SERVER_SIGNATURE My question is "why was __getitem__ of HTTPRequest.py designed this way?". Is there a good reason that it filters the keys according to membership of a standard-cgi-keys list, or whether they start with 'HTTP_' ? Would there be any disadvantage to altering __getitem__ so that it behaves according to its docstring? If so, the patch would probably be something like: line 753. """ #" + environ=self.environ + if environ.has_key(key) and (not hide_key(key)): + return environ[key] other=self.other if other.has_key(key): if key=='REQUEST': return self return other[key] if key[:1]=='U' and URLmatch(key) = 0: path = self._script + self._steps n = len(path) - atoi(key[3:]) if n 0: raise KeyError, key URL=join([other['SERVER_URL']] + path[:n], '/') other[key]=URL self._urls = self._urls + (key,) return URL - if isCGI_NAME(key) or key[:5] == 'HTTP_': - environ=self.environ - if environ.has_key(key) and (not hide_key(key)): - return environ[key] - return '' Comments? -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] getting request variables values
Steve Alexander wrote: My question is "why was __getitem__ of HTTPRequest.py designed this way?". Is there a good reason that it filters the keys according to membership of a standard-cgi-keys list, or whether they start with 'HTTP_' ? Would there be any disadvantage to altering __getitem__ so that it behaves according to its docstring? ...although the class docstring says that the environment variable names are as in the CGI specification (http://hoohoo.ncsa.uiuc.edu/cgi/env.html). It doesn't say that they should **only** be from the CGI specification, though. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] zzLocale 0-0-3a released on Zope Japan
Hi Zopistas, This is the second alpha release of zzLocale, a Zope locale support Product. zzLocale provides a framework for Zope interface internationalization (Zope and Products management screens). The localization is done on a per request basis, which allows developers from different countries to work on the same Zope while each of them having an interface in his native language. With zzLocale, Product developers can easily provide localized interfaces for their Products. All that is needed is to put the localized interface DTML templates in a "locales/[lang]" subdirectory of the Product, and zzLocale does the rest. This version of zzLocale is pretty useable, and usually falls back nicely when something goes wrong. However, it is still alpha, and we would not recommend using it on a production server. This release includes a complete (I mean, as complete as current zzLocale features permit) French interface, and a partial Japanese one. Tranlators are welcome to provide other languages. Please send us your translated templates so that we can include them in the next release. For more information and download: http://www.zope.ne.jp/users/yemartin/zzLocale Regards, -- Yves-Eric Martin Digital Garage Inc. [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] getting request variables values
Steve Alexander wrote: My question is "why was __getitem__ of HTTPRequest.py designed this way?". Is there a good reason that it filters the keys according to membership of a standard-cgi-keys list, or whether they start with 'HTTP_' ? Would there be any disadvantage to altering __getitem__ so that it behaves according to its docstring? I looked at the entire history of that code. This algorithm dates back to 1996. I think the issue is that environ may include the Zope process environment variables, such as PATH, LD_LIBRARY_PATH, CVSROOT, USER, etc. Publish.publish_module() appears to pass in os.environ . That's just a quick analysis, though. Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Redirecting from the manage interfaces.
Erik Enge wrote: call, it won't redirect. So you should be able to achieve the same results just by invoking manage_addImage without including the REQUEST object. But I have to pass something with the REQUEST, or else it won't add the image, right? I do not think so. "manage_addImage" does not need REQUEST to add the image. The request is only used to redirect. Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope] HowTo use LoginManager
Hi! There's no HowTo ... so my question is ... (my friend who runs the server hasn't installed it yet) How do I use LoginManager? I'm relatively new to Zope .. so please be quite detailed in your explanations. Thx! (What I'm searching for are details or whatever) TIA Wolfgang ___ 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] gvib InterBase DA, undefined symbol crypt
At 2000-07-21 00:40 -0400, Jeff Hoffman [EMAIL PROTECTED] wrote: On Thu, 20 Jul 2000, David Trudgett wrote: Hi all, After having successfully installed the gvib InterBase DA on a test machine running Red Hat Linux 6.1, I'm not having the same luck on the production box running RH 6.0. Here's what happens: $ python import gvib Traceback (innermost last): File "stdin", line 1, in ? File "/usr/local/Zope-2.1.6/lib/python/Products/gvibDA/gvib/gvib.py", line 46, in ? import gvibBase ImportError: /usr/lib/libgds.so: undefined symbol: crypt I'm perplexed. The only time I've run into this problem was when I forgot to link with libcrypt. Deja didn't turn up anything useful, either. I hate to point out the obvious, but, by default the Linux section in Setup.in reads: # # Use this on Linux. # #gvibBase gvibBase.c -D$(GVDEF) -I$(PYDIR) -L$(IBLIB) -lgds -lcrypt Note the comment. You need to comment the Solaris line, and uncomment the Linux line. In reality, the link with libcrypt is the only thing differentiating the two. Unfortunately, the compile will still succeed without -lcrypt being specified. You won't see the problem until you try to import the module, as seen above. so is there anyone here who can suggest how I might fix this? (By the way, the compile went through without a problem, and there was a -lcrypt on the appropriate Setup.in line). One other thought. The first time you run: make -f Makefile.pre.in boot a Setup file is created. If you then change Setup.in, you need to delete Setup and re-execute the above line. Otherwise, the changes won't be reflected. Jeff hit the nail on the head with that one. I've replied to him personally and thanked him. What I had done was inadvertently run the make -f before I had edited the Setup.in file. I then edited the file as I should have and re-ran make -f without realising I had to delete the file called "Setup". Ignorance is a curse. Anyway, this little tip will no doubt help someone else in the future. David Trudgett ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] all DTML Methods of current folder and subfolder
Hi! I have a dtml method in a folder which should display all "document_title"s of all "DTML Method"s in the current folder and all sub folders! (should work as navigation frame) How can I do that? I tried dtml-in "Info.objectValues(['DTML Method'])" where "Info" is the current folder where the method itself is stored but that didn't work ... :-( any suggestions? tia Wolfgang ___ 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] Broken products in 2.2 - bug?
Unfortunately I deleted the product and then made an equal product (after that it worked) so I cant tell if this was a bug. I'll let someone else who has the same problems try it. Peter Dieter Maurer skrev: Peter Arvidsson writes: The strange thing is that the product itself is not broken only all the instances become broken everytime I restart... Try the following: delete the products (okay start with a single one, just to try) from "ControlPanel/Products" (this of cause will be possible). restart Zope: look at ControlPanel/Products. Maybe, you now have a broken product with a traceback telling you the problem cause. By magic, Zope retains products in some cases when there is a problem during import without showing any indication of the problem (someone told in the list, that something is written to a log file, if logging is enabled). By removing the product manually, I hope Zope will show you the problem. If my proposal works indeed, then this product retaining behaviour is more a bug than a feature. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Datebug?
I have encountered a strange and irritating problem. As I live in Sweden we use timezone 'GMT+1'. I have a form like this: dtml-var standard_html_header form action="a" input type="text" size="15" name="date:date" value="dtml-var ZopeTime fmt=%Y-%m-%d" input type="submit" /form dtml-var standard_html_footer And when I press submit I come to this page: dtml-var standard_html_header input type="text" value="dtml-var date fmt=%Y-%m-%d" dtml-var standard_html_footer The input field are correctly displaying the date (in GMT+1) but when I submit the form and use the "fmt" the date is displayed with a decrease of 24 hours. Like if I write 2000-07-21 in the input-field the next page will display 2000-07-20. I I dont format the date on the second page the same date will be shown. It cant really be a timezone issue because it is decreasing the date by 24 hours and I only live 1 hour from GMT. The date on my computer and the server are correct. Does someone knows why this happens when I use "fmt" or is this a DateTime bug? ___ 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] Display the icon of a meta_type
Hello, At 22:42 20.07.2000 +, Maik Roeder wrote: I am using a ZCatalog object on my site. When I do a query, I want the results do display the meta_type of the document found with it's icon. I've seen that on Zope.org and loved this idea... the only problem is that it is a method on zope.org that does the trick (!--#var "icon_for_meta_type(REQUEST,meta_type=meta_type)"--) and I don't have the source for it. It's all there ;-) http://www.zope.org/SiteIndex/search/icon_for_meta_type/view_source OK, sometimes, I really feel stupid. Thank you very much. Best regards, Gérard Métrailler Jr. ___ 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] a very simple question
Sorry for this question, but I want to understand a DTML example which is in the DTML.pdf The sendmail example oblige to put the different variables on : - the variables subject and body are supplied from the FeedbackForm - the variables support and feedback are supplied from Folder properties I don't understand why (the different variables may be defined on the Feedbacksend dtml document no ???) Another problem is : on my feedback Form I can change the subject and object value, but, when I add an input to change the support value, the parameter on the line command is change, but the mail is send on the default adress. The example : dtml-var standard_html_header dtml-sendmail smtphost=gator.digicool.com To: Product Support dtml-var support From: Web Feedback Form dtml-var feedback Subject: dtml-var subject dtml-var body /dtml-sendmail Thank you for your input! dtml-var standard_html_footer Figure 14. A sample document that uses the dtml-sendmail tag dtml-var standard_html_header H2We want your input!/H2 form action=SendFeedback Destination : input type=text name=support size=40 br Subject: input type=text name=subject size=40 br textarea name=body rows=10 cols=50 /textareabr input type=submit value=Send Feedback /form dtml-var standard_html_footer Figure 15. A feedback form that collects a subject and body from a user and submits them to the SendFeedback document shown in figure 14. Excuse me for my English, but I'm a little french developper without any experience
Re: [Zope] Datebug?
Peter Arvidsson wrote: It cant really be a timezone issue because it is decreasing the date by 24 hours and I only live 1 hour from GMT. The date on my computer and the server are correct. Does someone knows why this happens when I use "fmt" or is this a DateTime bug? It could be one of a number of bugs. :( What version of Zope are you using? Try 2.2 and see fi it still happens... cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Enitity syntax and 2.2
[EMAIL PROTECTED] wrote: And how about: dtml.missing-REQUEST.form['foo']; over my dead body! ;-) I thought the point of the entity syntax was to keep it simple... which including python expressions does not... cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] URL quoting in python
I often create an external method for this... em: def url_quote(s): import urllib return urllib.quote_plus(s, safe='') Silly, but it works. I think the alternative is to hack the DT_Util.py module in the DocumentTemplate directory to expose urllib or a derived function. Isn't an external method a bit overkill? It is possible to just create a DTML Method called url_quote where the body is: dtml-var s url_quote (making sure there is no whitespace before this line, and no newline after it.) Then from any other DTML method you just call it remembering to pass in the parameter by name. e.g. dtml-call "RESPONSE.redirect(URL1+'?foo_bar='+url_quote(s=ufoobar))" -- Duncan Booth [EMAIL PROTECTED] int month(char *p){return(124864/((p[0]+p[1]-p[2]0x1f)+1)%12)["\5\x8\3" "\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure? http://dales.rmplc.co.uk/Duncan ___ 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] Entity syntax and 2.2
On Fri, Jul 21, 2000 at 10:05:08AM +0100, Chris Withers wrote: [EMAIL PROTECTED] wrote: And how about: dtml.missing-REQUEST.form['foo']; over my dead body! ;-) I thought the point of the entity syntax was to keep it simple... which including python expressions does not... Okay, let me see how I can roll over you! ;-) Perhaps you can suggest a simple way to do something like the following: dtml-if "REQUEST.form.has_key('foo')" dtml-let previouslyEnteredValue="REQUEST.form['foo'] input type=text ... value="dtml-previouslyEnteredValue;" /dtml-let dtml-else input type=text ... value="" /dtml-if -- Andres Corrada-Emmanuel Email: [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] (XML-RPC) Calling Database.manage_pack
Hello! I wrote a simple script to pack Data.fs on a regular basis. It is very simple, actually, just urllib.urllretrieve("http://my.zope/Control_Panel/Database/manage_pack?days:float=3") (a little bit harder than that, but I did it) Now I am trying to achieve the same with XML-RPC. No luck. How can I pass "days" parameter? server = xmlrpclib.Server("http://my.zope", BasicAuthTransport(login, password)) server.Control_Panel.Database.manage_pack(3) does not work - Zope returns an error abou invalid value, server.Control_Panel.Database.manage_pack(days=3) does not run at all - args expected to be a list, not a hash... Oleg.(All opinions are mine and not of my employer) Oleg Broytmann Foundation for Effective Policies [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ 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] second step (many of You are going to laungh ;-)
Use the QuickStart tutorial included in the Zope. Or. Go back to zope.org and download various tutorials A really useful thing to do, is to understand how Zope is built and what you can do with it. There are lots of good article links on the .org site. - Original Message - From: Vincent [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 19, 2000 8:21 PM Subject: [Zope] second step (many of You are going to laungh ;-) Hi, I just download Zope today, and I am wondering how I am going to start toding something. May somebody tell me whath is the first step to do to put a custom HTML page into ZOPE ? (I started the server, I can access the 'manage' tools - server:8080/manage), I guess I need to creat my HTML page with notepad, ultraedit or whatever, but the next step ? Creat a ZOPE object linked to this HTML page ? No idea how to do that... Thanks a lot Vincent ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] zzLocale 0-0-3a released on Zope Japan
Hi Zopistas, This is the second alpha release of zzLocale, a Zope locale support Product. zzLocale provides a framework for Zope interface internationalization (Zope and Products management screens). The localization is done on a per request basis, which allows developers from different countries to work on the same Zope while each of them having an interface in his native language. With zzLocale, Product developers can easily provide localized interfaces for their Products. All that is needed is to put the localized interface DTML templates in a "locales/[lang]" subdirectory of the Product, and zzLocale does the rest. This version of zzLocale is pretty useable, and usually falls back nicely when something goes wrong. However, it is still alpha, and we would not recommend using it on a production server. This release includes a complete (I mean, as complete as current zzLocale features permit) French interface, and a partial Japanese one. Tranlators are welcome to provide other languages. Please send us your translated templates so that we can include them in the next release. For more information and download: http://www.zope.ne.jp/users/yemartin/zzLocale Regards, -- Yves-Eric Martin Digital Garage Inc. [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] Entity syntax and 2.2
+[ [EMAIL PROTECTED] ]- | | Perhaps you can suggest a simple way to do something like the following: | | dtml-if "REQUEST.form.has_key('foo')" | dtml-let previouslyEnteredValue="REQUEST.form['foo'] | input type=text ... value="dtml-previouslyEnteredValue;" | /dtml-let | dtml-else | input type=text ... value="" | /dtml-if Replace the whole mess with:- input type="TEXT" value="dtml.missing-foo;" -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[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] all DTML Methods of current folder and subfolder
Hello, At 07:21 21.07.2000 +, Wolfgang Klinger wrote: I have a dtml method in a folder which should display all "document_title"s of all "DTML Method"s in the current folder and all sub folders! (should work as navigation frame) How can I do that? I tried dtml-in "Info.objectValues(['DTML Method'])" where "Info" is the current folder where the method itself is stored but that didn't work ... :-( Try using PARENTS[0] instead of Info if you want to display the current folder content. I am using the following (with a few sorting options for the dtml-in tag) in a ZClass (inheriting from CatalogAware and Folder) I created to render the content of the current folder. dtml-in "PARENTS[0].objectValues(['DTML Method'])" dtml-var title_or_id /dtml-in Best regards, Gérard Métrailler Jr. ___ 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] ZEO
Hallo, is the filesize of the Zope Storage Server also limited to 2 GB? Thanks ___ 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] all DTML Methods of current folder and subfolder
sorry to butt-in on this thread :^) how can i get the contents of sub-folders as well? i tried ZopeFind but i am just getting errors. thanks Regards, GEORGE DONNELLY [EMAIL PROTECTED] http://cyklotron.com/ The first precondition of self-esteem is that radiant selfishness of soul which desires the best in all things. --Ayn Rand At 07:21 21.07.2000 +, Wolfgang Klinger wrote: I have a dtml method in a folder which should display all "document_title"s of all "DTML Method"s in the current folder and all sub folders! (should work as navigation frame) How can I do that? I tried dtml-in "Info.objectValues(['DTML Method'])" where "Info" is the current folder where the method itself is stored but that didn't work ... :-( Try using PARENTS[0] instead of Info if you want to display the current folder content. I am using the following (with a few sorting options for the dtml-in tag) in a ZClass (inheriting from CatalogAware and Folder) I created to render the content of the current folder. dtml-in "PARENTS[0].objectValues(['DTML Method'])" dtml-var title_or_id /dtml-in ___ 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] ZEO
On Fri, Jul 21, 2000 at 12:46:11PM +0200, Sven Hohage wrote: is the filesize of the Zope Storage Server also limited to 2 GB? If you are running on a default Linux filesystem, the answer is yes. ZODB FileStorage isn't limited to 2GB, it's the filesystem that can't handle larger files that is the problem. -- Martijn Pieters | Software Engineermailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | ZopeStudio: http://www.zope.org/Products/ZopeStudio - ___ 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] Entity syntax and 2.2
Thanks guys, Replace the whole mess with:- input type="TEXT" value="dtml.missing-foo;" input type=text ... value="dtml-var "REQUEST.for['foo']" html_quote missing -- Andres Corrada-Emmanuel Email: [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] ZUBB/Ztree permission problem
Unless the ZDiscussion object has Anonymous/access information permission, nobody, including manager and owner, can't access the The Zdiscussion which has any content. running ZDiscussions-0.3.2 on Zope 2.1.6-5 Debian/Frozen. traceback follows: Traceback (innermost last): File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 179, in publish File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 165, in publish File /usr/lib/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: index_html) File /usr/lib/zope/lib/python/OFS/DTMLMethod.py, line 150, in __call__ (Object: index_html) File /usr/lib/zope/lib/python/DocumentTemplate/DT_String.py, line 504, in __call__ (Object: index_html) File /usr/lib/zope/lib/python/TreeDisplay/TreeTag.py, line 154, in render (Object: a tree tag) File /usr/lib/zope/lib/python/TreeDisplay/TreeTag.py, line 245, in tpRender (Object: ElementWithAttributes) File /usr/lib/zope/lib/python/TreeDisplay/TreeTag.py, line 321, in tpRenderTABLE (Object: ElementWithAttributes) Unauthorized: [0, 1, 2, 3] -- Riku Voipio [EMAIL PROTECTED] 09-862 60764 ___ 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] Entity syntax and 2.2
[EMAIL PROTECTED] wrote: Perhaps you can suggest a simple way to do something like the following: dtml-if "REQUEST.form.has_key('foo')" dtml-let previouslyEnteredValue="REQUEST.form['foo'] input type=text ... value="dtml-previouslyEnteredValue;" /dtml-let dtml-else input type=text ... value="" /dtml-if dtml-let value="REQUEST.get('foo', '')" input type=text ... value="dtml-value;" /dtml-let This is probably the best you're going to get. :-) Shane ___ 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] zzLocale 0-0-3a released on Zope Japan
IN SWEDISH - ABOUT SWEDISH Finns det ett intresse av fler an mig att jobba med detta? Om, det gor det, hur manga blir vi, och hur ska vi lagga upp arbetet? Smidigast vore ju att ge deltagare access till .dtml filer, med version'ing, pa en och samma server. Syftet ar nog mest att skriva om sidor som klienter kan tenkas anvanda. Intresserad? - Original Message - From: Yves-Eric Martin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 21, 2000 10:53 AM Subject: [Zope] zzLocale 0-0-3a released on Zope Japan Hi Zopistas, This is the second alpha release of zzLocale, a Zope locale support Product. zzLocale provides a framework for Zope interface internationalization (Zope and Products management screens). The localization is done on a per request basis, which allows developers from different countries to work on the same Zope while each of them having an interface in his native language. With zzLocale, Product developers can easily provide localized interfaces for their Products. All that is needed is to put the localized interface DTML templates in a "locales/[lang]" subdirectory of the Product, and zzLocale does the rest. This version of zzLocale is pretty useable, and usually falls back nicely when something goes wrong. However, it is still alpha, and we would not recommend using it on a production server. This release includes a complete (I mean, as complete as current zzLocale features permit) French interface, and a partial Japanese one. Tranlators are welcome to provide other languages. Please send us your translated templates so that we can include them in the next release. For more information and download: http://www.zope.ne.jp/users/yemartin/zzLocale Regards, -- Yves-Eric Martin Digital Garage Inc. [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 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] ZCatalog dynamic sites
Dimitris, Yes, ZCatalog cannot index methods which require call arguments. Pages generated from SQL data either use "brains" of SQL methods or squery string arguments of a DTML method, and therefore need to be passed arguments and cannot be cataloged. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 21, 2000 2:44 AM To: [EMAIL PROTECTED] Subject: [Zope] ZCatalog dynamic sites Hi all, I have a Zope site that uses MySQL to dynamically create some pages. What I want is the ability to search throughout the site, INCLUDING the pages that are database-driven. It seems to me that ZCatalog only finds items that exist *in zope*. Is it something ZCatalog can't do or am I missing anything obvious ? -- Dimitris http://atlas.central.ntua.gr:8000/~mc94068 ___ 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-killer: zSQL method that crashes Zope
If it matters to anyone, Andy isn't the only one with Zope killing ZSQL Methods I just spent way too much time trying to figure out why our stage enviroment was crashing. Turns out to be a ZSQL method which fails. Of course it wasn't wrapped in a try/except . Oh well, so much for standards...! DR Andy Gates wrote: Here's a thing. Those problems I was having with some sort of Zope-killing page have been tracked down to a particular zSQL method. The zSQL method is duff, in that is should fail - the perils of late-night coding on decaf, I fear - but it should fail neatly with a Zope error, not crash out the Python interpreter and force some poor schmuck to restart the limping Zope process. I don't know whether this is a peculiarity to my setup (NT4SP6, IIS4, Zope2, Access97 database) or a general problem; perhaps some of the developer-hatted Zopistas could take a look? The poison SQL is this: select (dtml-var field, field2) from tablename where (field1= dtml-sqlvar parameter1 type=string and dtml-var field '') Where two parameters are passed to the method, namely "field" and "parameter1". parameter1 is fed in as a dtml-sqlvar and searches against the table's field1 column. field is passed in as a dtml-var and is used to define which of the table's other fields is retruned. field2 is always returned. What makes the SQL duff is the parentheses around the fields in the first part of the SELECT. They're not required and if you remove them to produce the zSQL below, it works fine. select dtml-var field, field2 from tablename where (field1= dtml-sqlvar parameter1 type=string and dtml-var field ' So why does it kill Python? I'm only vaguely concerned now that I've found the fault, because of course the SQL is canned and no developer could get their hands on it - but this experience redoubles my acceptance of the notion of canned SQL! AndyG "I don't suffer from stress. I'm just a carrier." ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope and Mac
Hi, I'm having problems installing products from a Macintosh. I downloaded them onto my hard drive and uncompressed the .tgz files with Stuffit Expander. I then FTPed them with Fetch to my server, then restarted Zope. The products were listed in the Product Management folder, but they had broken icons and were not showing up in the "Add" list. I did not have this problem when doing the exact same thing on a PC. Any ideas how to fix this? Thanks. Tom Scheidt | www.falsemirror.com | [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] Datebug?
Hi Peter, I had the same problem. The fmt tag outputs GMT time but the methods of DateTime, i.e. day(), month(), year(), etc. do not. So I used them. Peter Arvidsson wrote: Forgot to say that... I run 2.2 final :/ Chris Withers skrev: Peter Arvidsson wrote: It cant really be a timezone issue because it is decreasing the date by 24 hours and I only live 1 hour from GMT. The date on my computer and the server are correct. Does someone knows why this happens when I use "fmt" or is this a DateTime bug? It could be one of a number of bugs. :( What version of Zope are you using? Try 2.2 and see fi it still happens... cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) -- * Anyone sending unwanted advertising e-mail to this address will be charged $25 for network traffic and computing time. By extracting my address from this message or its header, you agree to these terms. * Hiermit widerspreche ich der Nutzung oder Uebermittlung meiner Daten fuer Werbezwecke oder fuer die Markt- oder Meinungsforschung gemaess Paragraph 28 Absatz 3 des Bundesdatenschutzgesetzes. ___ 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 and Mac
Have had similar problems, but not on Mac, but on Windows98. My problem has been that IE saves files from zope.org with a different extension than that show on the Products page. This has caused archives to be incomplete, hence broken products. If you download a xxx.tar.gz, make sure it's called so on your Mac desktop as well. Maybe a Windows problem? - Original Message - From: Tom Scheidt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 21, 2000 2:59 PM Subject: [Zope] Zope and Mac Hi, I'm having problems installing products from a Macintosh. I downloaded them onto my hard drive and uncompressed the .tgz files with Stuffit Expander. I then FTPed them with Fetch to my server, then restarted Zope. The products were listed in the Product Management folder, but they had broken icons and were not showing up in the "Add" list. I did not have this problem when doing the exact same thing on a PC. Any ideas how to fix this? Thanks. Tom Scheidt | www.falsemirror.com | [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 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] Catalog contains items, but no results
Hmmm, more catalog strangeness.. I've finally gotten my product to add objects to a catalog correctly (with the correct URL) Whee! On my 2.2 development machine all appears fine, but on the 2.1.6 production server all searches come back with no results. When I look in "cataloged objects" in the management interface, there are many objects with correct URLs...??? Obviously I could just upgrade the production server, but I'm curious if there's something inherently wrong with my code. This is a sample of a call that I make to the Catalog. base_url=self.site_url() self.Catalog.catalog_object(ob,base_url+'/Promoters/'+id) Thanks for any ideas. -e- ___ 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 with Apache
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. For example, if I'm looking at the object /Foo/Bar/Baz, the list of items in the breadcrumbs might look like this: DTMLDocument at /Foo / Bar / Baz The links to Foo and Bar do not correctly take into account the extra item needed to tell Apache that the link goes to the Zope site. For example, the link to Foo needs to say something like http://foo.bar.com/Zope/Foo/manage_workspace instead of http://foo.bar.com/Foo/manage_workspace The tabs for the management screens work fine, however. Has anyone else encountered this and is this a bug in Zope, or simply a configuration issue that I need to resolve. If its a configuration issue, what would I need to change. Thanks. James W. Howe mailto:[EMAIL PROTECTED] Allen Creek Software, Inc. pgpkey: http://ic.net/~jwh/pgpkey.html Ann Arbor, MI 48103 ___ 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 and Mac
Thanks for your help. It seems to download an uncompress fine. It's alos showing up in the Zope management interface, but I get this when I look at the product in the Product Management Folder: Traceback (innermost last): File "/usr/local/Zope-2.1.5-src/lib/python/OFS/Application.py", line 395, in import_products product=__import__(pname, global_dict, global_dict, silly) File "/home/tscheidt/Products/PMPSurvey/__init__.py", line 1 __doc__ = """Survey Product Initialization Module""" __version__ = 'v0.01'[1:] import Survey import Question def initialize(context): context.registerClass( Survey.Survey, constructors = ( Survey.manage_addSurveyForm, Survey.manage_addSurvey), icon = 'survey_icon.gif' ) ^ SyntaxError: invalid syntax Tom Scheidt | www.falsemirror.com | [EMAIL PROTECTED] --- From: "Peter Bengtsson" [EMAIL PROTECTED] Date: Fri, 21 Jul 2000 15:44:33 +0100 To: "Tom Scheidt" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [Zope] Zope and Mac Have had similar problems, but not on Mac, but on Windows98. My problem has been that IE saves files from zope.org with a different extension than that show on the Products page. This has caused archives to be incomplete, hence broken products. If you download a xxx.tar.gz, make sure it's called so on your Mac desktop as well. Maybe a Windows problem? - Original Message - From: Tom Scheidt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 21, 2000 2:59 PM Subject: [Zope] Zope and Mac Hi, I'm having problems installing products from a Macintosh. I downloaded them onto my hard drive and uncompressed the .tgz files with Stuffit Expander. I then FTPed them with Fetch to my server, then restarted Zope. The products were listed in the Product Management folder, but they had broken icons and were not showing up in the "Add" list. I did not have this problem when doing the exact same thing on a PC. Any ideas how to fix this? Thanks. Tom Scheidt | www.falsemirror.com | [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 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: [ Zope] ZCatalog dynamic sites
Write a brains class that you would call to catalog and uncatalog insert/update/delete ZSQLmethods: For example: class MyObject: """ Some arbitrary object - MyObjectID - the id of your object MyCatalog - the catalog you want to use to index the sql MyText1 -metadata column in your catalog MyText2 -an additional metadata column in your catalog """ def FullText(self): "an index in your catalog" return "%s %s" % (self.MyText1, self.MyText2) def catalogObject(self): "Catalog me" self.MyCatalog.catalog_object(self, self.MyObjectID) def uncatalogObject(self): "Uncatalog me" self.MyCatalog.uncatalog_object(self.MyObjectID) Hope this helps, Corey ___ 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 and Mac
Peter, If you mean that IE renames the file to xxx.ar instaed of xxx.tar.gz then all you have to do is rename it after you have downloaded and all will be well. hth Phil - Original Message - From: "Peter Bengtsson" [EMAIL PROTECTED] To: "Tom Scheidt" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, July 21, 2000 3:44 PM Subject: Re: [Zope] Zope and Mac Have had similar problems, but not on Mac, but on Windows98. My problem has been that IE saves files from zope.org with a different extension than that show on the Products page. This has caused archives to be incomplete, hence broken products. If you download a xxx.tar.gz, make sure it's called so on your Mac desktop as well. Maybe a Windows problem? - Original Message - From: Tom Scheidt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 21, 2000 2:59 PM Subject: [Zope] Zope and Mac Hi, I'm having problems installing products from a Macintosh. I downloaded them onto my hard drive and uncompressed the .tgz files with Stuffit Expander. I then FTPed them with Fetch to my server, then restarted Zope. The products were listed in the Product Management folder, but they had broken icons and were not showing up in the "Add" list. I did not have this problem when doing the exact same thing on a PC. Any ideas how to fix this? Thanks. Tom Scheidt | www.falsemirror.com | [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 maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] ZBabel performance??
Wow! From 1) to 2) - both you and Zope DELIVER 1) "I can look at adding caching into ZBabel, but, it's not high on my priority list at the moment... I'm currently pounding the bricks. I'll try to make time over the weekend to have a look (I may be able to use the Zope Machinery to do the caching)." Sent: Fri 7/21/00 10:31 AM 2) I've added caching of phrase lookups using the ZSQL Methods caching facilties, it should cache up to 1,000 different phrases for 60 seconds. There is a 0.0.2 release on zope.org now. http://www.zope.org/Members/TheJester/ZBabel/ Sent: Fri 7/21/00 1:56 PM -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Andrew Kenneth Milton Sent: Friday, July 21, 2000 1:56 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [Zope] ZBabel performance?? +[ [EMAIL PROTECTED] ]- Snip... | translated. However my concern that if the page is accessed by thousands | of people, does Zope cache the translated text and serve it? does ZBabel I've added caching of phrase lookups using the ZSQL Methods caching facilties, it should cache up to 1,000 different phrases for 60 seconds. There is a 0.0.2 release on zope.org now. http://www.zope.org/Members/TheJester/ZBabel/ -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[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 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] more catalog issues
Strange... Now my 2.2 catalog is giving me the problems were supposed to be bugs in zope (catalog) 2.1.5 and lower... Inconsistancy, and missing indexes...??? When I update the catalog it corrects itself. h Any clues as to why my objects get cataloged incorrectly to start with? Is there a better syntax to use than 'catalog_object()'? Thanks for any pointers! -e- ___ 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] LoginManager ... USER SOURCE
Hi! LoginManager needs a User Source ... what can I use as User Source? I need detailed instructions ;-) Wolfgang ___ 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] request for advice
Hello folks, I'm just beginning to design my first big Zope application. I'm writing to ask zopististitiatatas for some advice, since I'm a bit of a newbie and I want to make sure: [a] I reuse as much code as possible [b] I make my code as reusable as possible [c] my application is stable and scalable 1. Background to the application I'm building an extranet product in Zope. Much of it will be centered around a 'VersioningObject'. An example of such an object might be an image, a Word document. The objects will have a preview view associated with them. For word docs, this will be a html-ised version, for photos it will be a thumbnail. Perhaps in the future each object will also have rudimentary online editing facilities. The objects will all support versioning. This means each object can be superceded by another object of the same type. The version number will be incremented. Versions will also have Confera forums associated with them, and ACLs. Now as I see it, I want a VersioningObject to be a Folderish object that can contain a set of Versions, which are just a load of File objects of the same type. The folder has a method which slects its most recent child file object and displays it by calling its preview method. Older versions are read-only and are listed by title only. 2) My questions: i) I'm worried about the sheer volume of binary data that would accrue in the VersioningObject: a single VersioningObject might be a Word doc of 25Mb. If it has 10 versions and there are 10 such objects, that's 2.5Gb in the ZOBD. I presume this would be a bad idea performance-wise; any suggestions? ii) I'm interested in using ZPatterns because I reckon they sound like they might enhance the reusability etc. of the code; I know there have been some pointers recently, but which ZPatterns could I benefit from? or are they too arcance to worry about for now? iii) Is there any other miscellaneous advice? e.g. has anything like this been done already? Thanking you all, ladies and gentlemen. Seb. ___ 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] Wiki apps other than ZWiki 0.6.1
I've been happily adding ManagedMode functionality to ZWiki 0.6.1 but wonder what other Wiki-on/in-Zope technologies there are that I should consider working with. I'm looking for cataloging, graphics upload, differencing, rename and delete and don't really want to have to work on them myself if these have been done or are soon to be done. Searching on 'Wiki' appears to be useless, since the word crops up in so many contexts, hence my appeal for information. Thank you, Geoff Gardiner ___ 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: Folderish objects and that BASE tag...
On Mon, 17 Jul 2000, Chris Withers wrote: If you go to: http://my.zope/site/file.html/ It will just return the DTML document :-) I wonder if it is redirecting to http://my.zope/site/file.html? I belive that it is returning: http://my.zope/site/file.html/index_html --RDM ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] request for advice
On Fri, Jul 21, 2000 at 04:29:01PM +0100, Seb Bacon wrote: Hello folks, I'm just beginning to design my first big Zope application. I'm writing to ask zopististitiatatas for some advice, since I'm a bit of a newbie and I want to make sure: [a] I reuse as much code as possible [b] I make my code as reusable as possible [c] my application is stable and scalable 1. Background to the application I'm building an extranet product in Zope. Much of it will be centered around a 'VersioningObject'. An example of such an object might be an image, a Word document. The objects will have a preview view associated with them. For word docs, this will be a html-ised version, for photos it will be a thumbnail. Perhaps in the future each object will also have rudimentary online editing facilities. The objects will all support versioning. This means each object can be superceded by another object of the same type. The version number will be incremented. Versions will also have Confera forums associated with them, and ACLs. Now as I see it, I want a VersioningObject to be a Folderish object that can contain a set of Versions, which are just a load of File objects of the same type. The folder has a method which slects its most recent child file object and displays it by calling its preview method. Older versions are read-only and are listed by title only. 2) My questions: i) I'm worried about the sheer volume of binary data that would accrue in the VersioningObject: a single VersioningObject might be a Word doc of 25Mb. If it has 10 versions and there are 10 such objects, that's 2.5Gb in the ZOBD. I presume this would be a bad idea performance-wise; any suggestions? ii) I'm interested in using ZPatterns because I reckon they sound like they might enhance the reusability etc. of the code; I know there have been some pointers recently, but which ZPatterns could I benefit from? or are they too arcance to worry about for now? iii) Is there any other miscellaneous advice? e.g. has anything like this been done already? Thanking you all, ladies and gentlemen. Seb. A couple of ideas: - Don't save your data (documents, images) in the ZODB. Instead, save it to disk using the Local File System product. This will prevent the ZODB from getting too big for most OSes. - I think it would be kind of interesting to use RCS for something like this on the backend. Build your methods in Zope to manipulate RCS, and then you get all the functionality of RCS "for free", and don't have to reinvent the wheel. You may run into problems with people not working with the most current document (I grab something from the database, Jill commits some changes to the same document, I make some changes, commit them, and destroy Jill's changes), but you would have that problem anyway as you initially described it. Hope this helps. -- Patrick Lewis [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] Monitor
Isn't anyone using the medusa/monitor_client.py script to debug their zopes? I can start it up fine and view the sequence of objects I have created, but my question is how do I access the return value of a DTML method? The Zope Debugging how-to is a little scant on the subject. -D ___ 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] request for advice
Steve Spicklmire has also written the ZCVSMixin product (which I've never actually used) that might let you integration filesystem versioning with Zope more easily as well... -Original Message- From: Patrick Lewis [mailto:[EMAIL PROTECTED]] Sent: Friday, July 21, 2000 12:50 PM To: '[EMAIL PROTECTED]' Subject: Re: [Zope] request for advice On Fri, Jul 21, 2000 at 04:29:01PM +0100, Seb Bacon wrote: Hello folks, I'm just beginning to design my first big Zope application. I'm writing to ask zopististitiatatas for some advice, since I'm a bit of a newbie and I want to make sure: [a] I reuse as much code as possible [b] I make my code as reusable as possible [c] my application is stable and scalable 1. Background to the application I'm building an extranet product in Zope. Much of it will be centered around a 'VersioningObject'. An example of such an object might be an image, a Word document. The objects will have a preview view associated with them. For word docs, this will be a html-ised version, for photos it will be a thumbnail. Perhaps in the future each object will also have rudimentary online editing facilities. The objects will all support versioning. This means each object can be superceded by another object of the same type. The version number will be incremented. Versions will also have Confera forums associated with them, and ACLs. Now as I see it, I want a VersioningObject to be a Folderish object that can contain a set of Versions, which are just a load of File objects of the same type. The folder has a method which slects its most recent child file object and displays it by calling its preview method. Older versions are read-only and are listed by title only. 2) My questions: i) I'm worried about the sheer volume of binary data that would accrue in the VersioningObject: a single VersioningObject might be a Word doc of 25Mb. If it has 10 versions and there are 10 such objects, that's 2.5Gb in the ZOBD. I presume this would be a bad idea performance-wise; any suggestions? ii) I'm interested in using ZPatterns because I reckon they sound like they might enhance the reusability etc. of the code; I know there have been some pointers recently, but which ZPatterns could I benefit from? or are they too arcance to worry about for now? iii) Is there any other miscellaneous advice? e.g. has anything like this been done already? Thanking you all, ladies and gentlemen. Seb. A couple of ideas: - Don't save your data (documents, images) in the ZODB. Instead, save it to disk using the Local File System product. This will prevent the ZODB from getting too big for most OSes. - I think it would be kind of interesting to use RCS for something like this on the backend. Build your methods in Zope to manipulate RCS, and then you get all the functionality of RCS "for free", and don't have to reinvent the wheel. You may run into problems with people not working with the most current document (I grab something from the database, Jill commits some changes to the same document, I make some changes, commit them, and destroy Jill's changes), but you would have that problem anyway as you initially described it. Hope this helps. -- Patrick Lewis [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 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] ZServer Statistics
Hi, Is there way to determine how many (and which)pages ZServer serves? I am running ZServer as my primary Have a look into /path_to_your_zope/var/Z2.log Robert -- Robert Wohlfahrt ([EMAIL PROTECTED]) Tel: 0179 / 2980074 Fax: 0351 / 2880145 ___ 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] ZBabel performance??
For non-cacheable pages that can't be speeded up by a reverse proxy, there might be two other possibilities worth looking at as well. If Zbabel is mainly needed for the production/maintenance of translations rather than for really dynamic pages it might be possible to use ZMirror for semi-static per language templates generated by ZBabel that get combined dynamically with the dynamic non-translated bits. For really dynamic translations, if the database hits are still too much for some users, despite being read only and therefore usually in buffers, it might be possible to copy the maintenance ZBabel database stored in a persistent SQL database from the management screens into a RAM Gadfly database used by the actual page generation. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Andrew Kenneth Milton Sent: Friday, July 21, 2000 10:31 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [Zope] ZBabel performance?? +[ [EMAIL PROTECTED] ]- | Hi, | | I was able to install and test the ZBabel product. | Very nice product indeed!! I have a question about performance.. Thanks :-) [...snip...] | However my concern that if the page is accessed by thousands | of people, does Zope cache the translated text and serve it? does ZBabel | do that? or is there a way to do that? If you are passing query_string parameters into your page you will not be able to cache the pages anyway. If a page is cacheable then you can setup a HTTP accellerator in front of Zope that will cache the rendered pages. I don't know what your current network topology is like, so it's a little hard to comment. I can look at adding caching into ZBabel, but, it's not high on my priority list at the moment... I'm currently pounding the bricks. I'll try to make time over the weekend to have a look (I may be able to use the Zope Machinery to do the caching). | I do not want to hit the database | everytime someone requests that page.. Our site is usually translated to 5 | languages and we had developed a Perl script that would read php tags and | create static pages becuase of that problem, and in this case we do not | know at all what happend in eth backend.. Out of interest how many hits per hour are you doing? I worked on a largish portal system (ASP *puke*) and they had no problem going to the DB very very frequently. The key for the phrase is 32 bytes, it should be very quick to look up, even in a poorly tuned MySQL. -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[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 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] review product proposal
Hi, "J. Atwood" (I was unable to get his email from the mailing list search interface) wrote some days ago: On my list of products that I would like to build / help build ZCLassifieds: A product that allows users to post classifieds for sale with categories, pictures, start and end dates, email contacts, etc. Could be anonymous or require a log in that plays upon the strengths of Zope. ZReview: A generic review product that allows people to post reviews of "things" and have other people comment on the review. A lot of what is in Zope Treasures but maybe with pictures etc. Has anyone starting building these, need these, or would be interested in helping build these? [K.A.] I just need this for a site I am working on, based on ZDP-Tools. Document rating is one of the thing lacking. ZDP-Tools is ZClass-based, so if you like ZClasses, you might be interested to collaborate on it and leverage this solution for your applications. Actually, there is a ZDP-Tools development effort at Sourceforge (since this week) and you might be interested to join our discussions. Maik Roeder or I is going to do a formal announcement later. Regards, Kamon Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com ___ 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] Monitor
[EMAIL PROTECTED] wrote: Isn't anyone using the medusa/monitor_client.py script to debug their zopes? I can start it up fine and view the sequence of objects I have created, but my question is how do I access the return value of a DTML method? The Zope Debugging how-to is a little scant on the subject. python monitor_client.py localhost 8099 (enter password) import Zope app = Zope.app() m = app.folder1.subfolder.myMethod m() and don't forget.. get_transaction().commit() Shane ___ 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-dev] Datebug?
Peter Arvidsson wrote: try this: input type="text" value="dtml-var "date+0.5" fmt=%Y-%m-%d" I think it's a round problem with the float representation of the date. martin Since it is adding 24 hours Are you _sure_ it is adding 24 hours? The string you gave only shows date, not time. Try showing the time as well, and see what happens. I had a similiar problem once, thought this might be of some use. -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ 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] all DTML Methods of current folder and subfolder
Wolfgang Klinger writes: I have a dtml method in a folder which should display all "document_title"s of all "DTML Method"s in the current folder and all sub folders! I tried dtml-in "Info.objectValues(['DTML Method'])" where "Info" is the current folder where the method itself is stored but that didn't work ... :-( dtml-in "ZopeFind(this(),obj_metatypes=['DTML Method'], search_sub=1)" sort=id dtml-id;br /dtml-in You cannot use "document_id" or "document_title" because they are only defined dynamically (during rendering). Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZCatalog dynamic sites
I have a Zope site that uses MySQL to dynamically create some pages. What I want is the ability to search throughout the site, INCLUDING the pages that are database-driven. It seems to me that ZCatalog only=20 finds items that exist *in zope*. Is it something ZCatalog can't do or am I missing anything obvious ? ZCatalog catalogues objects. Objects must help ZCatalog by providing attributes and/or parameterless methods. When the object is indexed, ZCatalog accesses the attributes/methods to obtain the terms the object should be indexed for. And the objects must be URL addressable, because they are itentified inside the catalog by their URL. ZCatalog can index any object that satisfies these requirements. You probably must work that your dynamic objects with database contents do that. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] dumb dtml-in question
I'd like to use the dtml-in tag to get the number of files in a specific folder. Tom Scheidt | www.falsemirror.com | [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] dumb dtml-in question
dtml-in "objectValues()" dtml-var sequence-length /dtml-in This prints out the value every time though so you might do a return or do a request set depending upon what you are doing, or use a first / last system... dtml-in "objectValues()" dtml-if sequence-end dtml-var sequence-length /dtml-if /dtml-in Prints only once - Original Message - From: "Tom Scheidt" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 21, 2000 2:58 PM Subject: [Zope] dumb dtml-in question I'd like to use the dtml-in tag to get the number of files in a specific folder. Tom Scheidt | www.falsemirror.com | [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 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] An observation about manage_* methods
This has a question to it if I am not overlooking something. I often want to design dtml_methods that allow the end user to manage content under his control. An example of a typical manage method that you often see is like: From TinyTable.py: def manage_editData(self, data, REQUEST=None): """Change item data""" self._rows = map(self._FixRow, ImportExport.ImportData(data)) self._n_rows = len(self._rows) self._GenerateIndex() return self.manage_editedDialog(REQUEST) Now there is an assumption in this code that the editing context that this is being called from is some manage_ method, hence returns like "return self.manage_editedDialog(REQUEST)". This is annoying if you are writing a user-managed content method that does not wants the user to see the manage interface because eventually it goes to one with such returns. Instead, I would like to have control on where he/she returns (often to the method I wrote or to index_html). I could do a dtml-call "RESPONSE.redirect..., but the return self.manage_editedDialog(REQUEST) gets in the way. Am I overlooking something or is this a weakness in this design pattern for management? I could wind up making my own version of manage_editData that does not do the return self.manage_editedDialog(REQUEST). (I know some code at least conditionalizes this to the presence of REQUEST.) Thoughts? Ideas? Regards, Albert Boulanger [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 require an @ symbol in email form field??
On Tue, 18 Jul 2000, Duncan Booth wrote: Use javascript to check that all required fields are present before the form is actually submitted. Here is some of the code I use: Note, however, that using Javascript to do the checking client side is only useful as a user convenience. If you have data validation issues you *must* repeat the validation server side, in case some clever cracker^h^h^h^h^h^h^huser bypasses your form and submits data without going through the javascript. --RDM ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] A Better Way (Stupid DTML code)
Other smug answers include: - dont put - in your SQL methods - use your SQL to give the variable a different name - use python - Original Message - From: "Phil Harris" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; "Dennis Baker" [EMAIL PROTECTED] Sent: Friday, July 21, 2000 4:29 PM Subject: Re: [Zope] A Better Way (Stupid DTML code) dtml-in SQL_list_providers dtml-if "_.int(_['min-provid']) 2" dtml-if sequence-start h3Search for Member Information/H3 dtml-var MemberSearchForm /dtml-if /dtml-if /dtml-in - Original Message - From: Dennis Baker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, July 22, 2000 12:08 AM Subject: [Zope] A Better Way (Stupid DTML code) Ok, there has to be a better way of doing this, I just want to show a dialog if there minimum value of a field is lower than 20,000. This is the only way I could figure out to do this, Python seems to choke on variables with Hyphens so I have to use the dtml-let It works but it's a STUPID way to do things. dtml-in SQL_list_providers dtml-let min_provid=min-provid dtml-if "min_provid '2'" dtml-if sequence-start h3Search for Member Information/H3 !-- ** Show the Member Search Form ** -- dtml-var MemberSearchForm /dtml-if /dtml-if /dtml-let /dtml-in ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ 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] dumb dtml-in question
How about just: dtml-var "_.len(folder.objectIds())" --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 - Original Message - From: Andy McKay [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 21, 2000 3:53 PM Subject: Re: [Zope] dumb dtml-in question dtml-in "objectValues()" dtml-var sequence-length /dtml-in This prints out the value every time though so you might do a return or do a request set depending upon what you are doing, or use a first / last system... dtml-in "objectValues()" dtml-if sequence-end dtml-var sequence-length /dtml-if /dtml-in Prints only once - Original Message - From: "Tom Scheidt" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 21, 2000 2:58 PM Subject: [Zope] dumb dtml-in question I'd like to use the dtml-in tag to get the number of files in a specific folder. Tom Scheidt | www.falsemirror.com | [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 maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] packing on ZSPs (was Re: [Zope] zope.org down)
ethan mindlace fremen [EMAIL PROTECTED] writes: Well, folks, zope.org is down again, because the site was packed without enough space on the device. ... To keep this from happening again, we will be adding an additional 40gb drive that should do us just fine until the Data.fs hits 2 GB. This is a general problem for zope service providers and their users; I wonder how we can resolve it ? Related, though specific to Codeit users: I need to pack to avoid the above, but fear the data-corrupting packing bugs which were fixed in more recent versions of zope. Codeit, perhaps time for an upgrade ? At least to 2.1.6 ? Best regards -Simon ___ 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: Zope pcgi
Michael Arndt wrote: Hi Bill this seems to address our Problem: Response: Some platforms may require setting: PCGI_CLOSE_FDS=0 in the pcgi resource file, since configure cannot reliably discover this at compile time. (Patches Bugreprorts ...) WORKS!! -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ 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] URL quoting in python
Thanks for the tip Duncan, I find it strange that this utility function is not in the _ namepace... time to make a trip to the Tracker. It seems like a url-encoding function should be directly accessible from zope. Thanks Kapil Duncan Booth wrote: I often create an external method for this... em: def url_quote(s): import urllib return urllib.quote_plus(s, safe='') Silly, but it works. I think the alternative is to hack the DT_Util.py module in the DocumentTemplate directory to expose urllib or a derived function. Isn't an external method a bit overkill? It is possible to just create a DTML Method called url_quote where the body is: dtml-var s url_quote (making sure there is no whitespace before this line, and no newline after it.) Then from any other DTML method you just call it remembering to pass in the parameter by name. e.g. dtml-call "RESPONSE.redirect(URL1+'?foo_bar='+url_quote(s=ufoobar))" -- Duncan Booth [EMAIL PROTECTED] int month(char *p){return(124864/((p[0]+p[1]-p[2]0x1f)+1)%12)["\5\x8\3" "\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure? http://dales.rmplc.co.uk/Duncan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] packing on ZSPs (was Re: [Zope] zope.org down)
- Original Message - From: "Simon Michael" [EMAIL PROTECTED] Related, though specific to Codeit users: I need to pack to avoid the above, but fear the data-corrupting packing bugs which were fixed in more recent versions of zope. Codeit, perhaps time for an upgrade ? At least to 2.1.6 ? My experience is that CodeIt, in order not to surprise you with unexpected upgrades, will upgrade your Zope server when you ask. -- Loren ___ 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] Working with Lists
Terry Babbey writes: Here is my code and my error. dtml-in "_.getitem(ProgCode,0).CL" dtml-let item=sequence-item dtml-var "item[0]" /dtml-let BR /dtml-in Zope has encountered an error while publishing this resource. Error Type: IndexError Error Value: string index out of range CL is a property of a dtml document and is a list of courses for a given program. My goal is to test character 8 of each line and if it is a - (dash) then it represents a course name which I will usr to point to a course description. Any help? One of the list elements is empty, there is no index "0". Try: dtml-if "item[7:8] == '-'" contains '-' as 8.th character /dtml-if "item[7:8]" gives the 8.th character, if it exists, and otherwise the empty string. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] NESTED IN STATEMENTS AND PASSING VARIABLES in DTML
[EMAIL PROTECTED] writes: This is FAQ material and should be inserted into either the DTML programmer's guide or the ZSQL Methods guide. It bites everyone who uses SQL methods eventually. ZSQL methods do not perform acquisition, but will look at REQUEST, change it to. A minor clarification of terms: * *acquisition* acquires attributes/methods form containing objects or the context of the objects use * DTML methods usually are passed a *namespace* containing name-value bindings. This namespace contains many variables, REQUEST and its content, acquired attributes/methods, variables made available with dtml-with, dtml-let, dtml-in, dtml-tree... Z SQL methods do support acquisition. They are, however, not called (automatically) with the current namespace but only with the REQUEST object. Thus, they can automatically use only acquired attributes/methods and variables contained in REQUEST but not the variables defined in an enclosing DTML method (via with, let, in, tree ). Acquired attributes do not need tp be listed in the "Arguements" property of the Z SQL method, REQUEST variables have to. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] GUF Authentication Problems
Nope that was a lie. I still have the same problem. Damn. - Original Message - From: "Andy McKay" [EMAIL PROTECTED] To: "Mario Premke" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, July 19, 2000 4:39 PM Subject: Re: [Zope] GUF Authentication Problems Thanks to you, and thanks to Brad. That works... now there are a whole bunch of other security issues of course :) - Original Message - From: "Mario Premke" [EMAIL PROTECTED] To: "Andy McKay" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, July 19, 2000 3:41 PM Subject: Re: [Zope] GUF Authentication Problems Yes - thanks to Brad. Give the proxy role (Authorizer) the permission "Access contents informations" in the folder you want to protect (i.e. the folder above GUF). Cheers Mario Did anyone find a solution to this problem? I have the exact same problem when try to access that object: 2000-07-19T22:09:27 ERROR(200) GUF http://127.0.0.1:8080/acl_users/userAuthenticate raised an exception (('Unauthorized', 0, traceback object at 18bf888)) Thanks - Original Message - From: "Mario Premke" [EMAIL PROTECTED] To: "Dieter Maurer" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, July 17, 2000 9:25 AM Subject: Re: [Zope] GUF Authentication Problems Yes, I made the proxy roles ... Before that Zope said: you are not authorized to access emUserAuthentication/em But meaanwhile I turned to Zope-2.2.0 and I recognized "Login Manager" in the Available Objects. Is that the Login MAnager which was formerly distributed as a Product and hence makes GUF obsolete ?? Thanks MArio Mario Premke writes: Maybe, your password is encrypted? NO, it isn't. The problem is, that I cannot access "real_password", because Zope says: 2000-07-12T15:54:46 ERROR(200) GUF http://134.96.119.88:8080/portal_folder/acl_users/userAuthenticate raised an exception (('Unauthorized', 'You are not authorized to access emreal_password/em.', traceback object at 857e2d0)) I know. Because I read the Zope digests, I am always about 1 day behind. I, therefore, may respond to questions already answered by the poster or others. You tried a proxy role as suggested by someone else? Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ 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 )