[Zope] Form Validation
Hi, I see you can let Zope do basic form validation for you by appending ":string" or ":int" to your form name. The error messages that are displayed are not that clear, however. How can I get more control over what happens when an error occurs? (e.g. I'd like to be able to get back a list/ditionary of errors instead of handling them one by one) Where can I get documentation on all the built-in form validation options at my disposal? (e.g. a field may not be required, but if it is filled in it has to be an integer) Is Zope's built-in form validation sufficient for a complex system? Are there better ways to do form validation? I saw a php program on freshmeat.net the other day that supposedly generates forms complete with client and server-side validation. Do we have a similar product in Zope? Thanks, Andreas. -- In a world without fences, who needs gates? ___ 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] categorization request
ethan mindlace fremen wrote: > > Zopatistas! > > I'd like to categorize the how-Tos in a similar style to how the > products have been categorized. > What I'm looking for is a volunteer who is willing to go through *all* > the current HowTos and propose a classification. Tim Cook has indicated that he'd classify the how-tos. Yay Tim! ~mindlace ___ 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 module & through the web security
Chris McDonough wrote: > There's the perception at DC that > 're' isn't appropriate for through-the-web usage because it's possible to > write and use regex that sends the Python interpreter thread it's > operating within into a neverending loop. Sorry. Am I the only one who thinks this is silly? One of Zope's key strengths is its granular security, right? So why isn't it the reponsibility of the site designer/maintainer/owner/whatever to ensure that only people he trusts have the ability to write DTML? It seems like that perception is hobbling Python Methods, in particular, by removing useful stuff like the re module because the assumption is being made that people editing TTW code will be untrusted. IMH(umble), either you don't have confidence in Zope's security, or you're assuming your users are stupid (that may be fair for a lot of us, but still ;-) Comments? :-) 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 )
[Zope] Tracker weirdness
Hi everyone :-) I am trying (desperately) to use a Tracker on my own site. So I checked one out of CVS and started using it. I created some users for my website with their very own roles. Now when one of those users tries to view the issues listed in the Tracker (like someone would do on www.zope.org) we just get an error: (sorry about the lenghty posting) - Unauthorized You are not authorized to access issueSummaryRows. Traceback (innermost last): File /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: index_html) File /usr/local/Zope-2.2.0-linux2-x86/lib/python/OFS/DTMLMethod.py, line 167, in __call__ (Object: index_html) File /usr/local/Zope-2.2.0-linux2-x86/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: index_html) File /usr/local/Zope-2.2.0-linux2-x86/lib/python/DocumentTemplate/DT_Let.py, line 147, in render (Object: criteria="{'type': 'tracker_issue'}" default_batch_size="trackerpref(pref='batch_size', default=10, REQUEST=REQUEST)" refine_defaults="[('refine_show', 'Close Advanced Search'), ('refine_type', 'strict'), ('any', ''), ('public', 'ON'), ('private', 'ON'), ('requester', []), ('supporter', []), ('priority', []), ('stage', ['pending', 'accepted']), ('batch_size', default_batch_size)]" init="(not REQUEST.get('refine_mode', ()) or REQUEST.get('refine_vanilla', ()))" type="(((REQUEST.get('refine_show', ()) == 'Close Advanced Search') and 'simple') or ((REQUEST.get('refine_show', ()) == 'Open Advanced Search') and 'elaborate') or REQUEST.get('refine_mode', 'simple'))" didb="_.has_key('did_basic')" didt="_.has_key('did_traitvalues')" topp="REQUEST.get('topprev', 0)" topn="REQUEST.get('topnext', 0)" topc="REQUEST.get('topbatchchange', 0)" topretain="REQUEST.get('topbatchretain', 0)" top="(topp or topn)" botp="REQUEST.get('bottomprev', 0)" botn="REQUEST.get('bottomnext', 0)" botc="REQUEST.get('bottombatchchange', 0)" botretain="REQUEST.get('bottombatchretain', 0)" bot="(botp or botn)" batch_last_start="REQUEST.get('batch_last_start', 0)" batch_last_end="REQUEST.get('batch_last_end', 0)" cur_batch_size="_.max(1, ((top and REQUEST.get('batch_size_top', 0)) or (bot and REQUEST.get('batch_size_bottom', 0)) or (topc and REQUEST.get('batch_size_top', 0)) or (botc and REQUEST.get('batch_size_bottom', 0)) or REQUEST.get('batch_size', default_batch_size))) or 15" direction="((topp or botp) and -1) or ((topn or botn) and 1) or 0") File /usr/local/Zope-2.2.0-linux2-x86/lib/python/DocumentTemplate/DT_Let.py, line 147, in render (Object: got="issuesSearch(this(), criteria, REQUEST=REQUEST)" currents="got[0]" numpriors="got[1]" numafters="got[2]" totmatches="_.len(currents) + numpriors + numafters" simple="REQUEST.get('refine_show', ()) == 'Close Advanced Search'") File /usr/local/Zope-2.2.0-linux2-x86/lib/python/DocumentTemplate/DT_With.py, line 133, in render (Object: _(isr = currents[0].issueSummaryRows, elements=currents)) File /usr/local/Zope-2.2.0-linux2-x86/lib/python/DocumentTemplate/DT_Util.py, line 337, in eval (Object: _(isr = currents[0].issueSummaryRows, elements=currents)) (Info: currents) File , line 0, in ? File /usr/local/Zope-2.2.0-linux2-x86/lib/python/DocumentTemplate/DT_Util.py, line 140, in careful_getattr File /usr/local/Zope-2.2.0-linux2-x86/lib/python/OFS/DTMLMethod.py, line 189, in validate (Object: index_html) File /
Re: [Zope] re module & through the web security
i for my part think it makes sense. not just from a security standpoint (think of those sites that allow members who are not necessarily hand-picked to write DTML or attempt to do so) but also from a knowledge level standpoint. who wants their site crashed just because the new programmer doesn't know how to use that re functionality correctly? looking back at all the products and projects i have been involved in i did not have to use the re module a single time. as you know, you can still use the whole module in zope code that resides on the filesystem, like in products or in external methods. i'd rather be inconvenienced once every few months than basically invite denial of service attacks. jens Jens Vagelpohl The VW Type 4 on the Web: http://www.type4.org on 9/6/00 5:43, Chris Withers at [EMAIL PROTECTED] wrote: > Chris McDonough wrote: >> There's the perception at DC that >> 're' isn't appropriate for through-the-web usage because it's possible to >> write and use regex that sends the Python interpreter thread it's >> operating within into a neverending loop. Sorry. > > Am I the only one who thinks this is silly? > > One of Zope's key strengths is its granular security, right? > So why isn't it the reponsibility of the site > designer/maintainer/owner/whatever to ensure that only people he trusts > have the ability to write DTML? > > It seems like that perception is hobbling Python Methods, in particular, > by removing useful stuff like the re module because the assumption is > being made that people editing TTW code will be untrusted. > > IMH(umble), either you don't have confidence in Zope's security, or > you're assuming your users are stupid (that may be fair for a lot of us, > but still ;-) > > Comments? :-) > > 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 )
[Zope] WOWDamn !! ZopeNewbies wakeup
This is for any+all of you new to Zope.. and for those like me who have been struggling with DMTL for too long. I just found a perfect *gemstone* burried in 'Chapter6 - Advanced DTML' of the online sample of the O'Reilly Zope Book at http://www.zope.org/Members/michel/ZB/AdvDTML/view """ The REQUEST namespace is very useful in Zope since it is the primary way that clients (in this case, web browsers) communicate with Zope by providing form data, cookies and other information about themselves. A very simple and enlightening example is to simply print the REQUEST out in an HTML page: Try it...beautiful and yes very enlightening. This should be on www.zope.org PageZero in my opinion I never saw a single line of ZopeDTML which so well demonstrates what it is capable of and why it _is_ cool when you know what to type. Get this book in Print asap please! thanks - Jason PS. Be warned: <8-() if you try put the code above in a DTML methods named 'showREQUEST' or 'show_REQUEST' it will not work = 'Id already in use' Jason CUNLIFFE = NOMADICS.(Interactive Art and Technology).Design Director ___ 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 module & through the web security
Hi, Chris Withers wrote: > > Chris McDonough wrote: > > There's the perception at DC that > > 're' isn't appropriate for through-the-web usage because it's possible to > > write and use regex that sends the Python interpreter thread it's > > operating within into a neverending loop. Sorry. > > Am I the only one who thinks this is silly? > > One of Zope's key strengths is its granular security, right? > So why isn't it the reponsibility of the site > designer/maintainer/owner/whatever to ensure that only people he trusts > have the ability to write DTML? > > It seems like that perception is hobbling Python Methods, in particular, > by removing useful stuff like the re module because the assumption is > being made that people editing TTW code will be untrusted. > > IMH(umble), either you don't have confidence in Zope's security, or > you're assuming your users are stupid (that may be fair for a lot of us, > but still ;-) > > Comments? :-) > I think the granularity could be finer. If one could give some users access to more 'riscy' modules and some not, it schould be sufficient. I schould write a proposal for thru the web python products... *g* Greetings Tino ___ 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] 'showREQUEST' or 'show_REQUEST' ?
Jason Cunliffe wrote: > PS. Be warned: <8-() > if you try put the code above in a DTML methods named 'showREQUEST' or > 'show_REQUEST' it will not work = 'Id already in use' That's a little weird... Can anyone shed any light on this? 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] Underscore Caracter
Tino Wildenhain wrote: > > Turn "asd_asd" into "asd asd" and output: > > > > > > > I've seen this on plenty lines of digicools code and wondered > about if this is more efficient then using just string.replace() > ? > I would say string.replace() should be a bit faster. I think the reasons may be historical. For a long time the Zope documentation listed the join and split members of the string module, but whoever wrote the documentation the first time around missed out replace. So anyone coming at Zope from the DTML direction is likely not to spot the replace method. Calling _.string.replace requires two attribute lookups and one python method call. replace itself requires zero or one memory allocation for the result. Calling join/split requires four attribute lookups, two python method calls and n+3 memory allocations where n replacements are made (1 allocation when n is 0). So I agree, replace should be faster, although given everything else that is going on, unless you do a lot of them you probably won't notice. -- 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] [ANN] Whois Tools for Python & Zope
Just a small package that some people may find useful. When used with Zope, it creates a tag that does a whois lookup on a variable. For example: Will result in: Whois Server Version 1.1 Domain names in the .com, .net, and .org domains can now be registered with many different competing registrars. Go to http://www.internic.net for detailed information. Domain Name: ZOPE.ORG Registrar: NETWORK SOLUTIONS, INC. Whois Server: whois.networksolutions.com Referral URL: www.networksolutions.com Name Server: NS02.CODEIT.COM Name Server: NS1.DIGICOOL.COM Updated Date: 22-feb-1999 >>> Last update of whois database: Tue, 5 Sep 00 05:04:09 EDT <<< The Registry database contains ONLY .COM, .NET, .ORG, .EDU domains and Registrars. You can also explicitly specify a server to contact. Download it from: http://www.zope.org/Members/Dom2/whoistools/ Please let me know if you find it useful or find bugs. -Dom ___ 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] acl_users mystery
Howdy! I had a strange problem today: I added a Role "User" in the root's security tab and gave it a couple of permissions. But further down the tree in /de/support where in the acl_users folder I added a user with the role 'User' the permissions where not acquired (until set manually in the /de/support security tab I couldn't log in) although 'Acquire permission settings' was turned on all the way down the tree. Very mysterious. Did I misunderstand the whole idea or is there something wrong? (Zope 2.1.6) Ragnar ___ 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
On Tue, 5 Sep 2000 20:23:47 -0600, "T.J. Mannos" <[EMAIL PROTECTED]> wrote: >Now, who do I have to beat up to get the 're' module added to the namespace >variable??? :) Not a good idea its too easy for a buggy regex to eat up lots of memory and processor time. Toby Dickenson [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] problem with virtualhosts
Hi all, My server is running with Zope 2.1.6 and SiteAccess 1.0.1. I followed the instructions of the very clear how-to created by Anser. But it there is one problem which I can't solve. I want to serve pages with Apache and with Zope. The url to serve pages with Zope should be: www.myserver.nl/z In the root of Zope I add a subfolder called mysubfolder. This folder should be the siteroot of this site. This is the configuration of my httpd.conf; ServerName www.myserver.nl NameVirtualHost 12.345.67.890 ServerName www.myserver.nl DocumentRoot /home/httpd/html ProxyPass /z http://www.myserver.nl:8080/mysubfolder ProxyPassReverse /z http://www.deeldrie.nl:8080/deeldrie ProxyPass /misc_ http://www.myserver.nl:8080/misc_ ProxyPass /p_ http://www.myserver.nl:8080/p_ In 'mysubfolder' in Zope I added the following SiteRoot object: title: (ignored) base: http://www.myserver.nl/z path: / Till here everything goes fine. The url www.myserver.nl/z shows the correct pages. But the problem is in the management interface of Zope. The generated url in the main section of the management interface doesn't work anymore: Instead of sending the browser to www.myserver.nl/z/mysubfolder/mysubsubfolder, it is sending the browser to: www.myserver.nl/mysubfolder/mysubsubfolder which can't be found. I spent several days to solve this but I didn't found a solution. Can somebody please help me out with this problem? regards, Wouter ___ 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] correction (problem with virtualhosts)
This is a correction for my last entry at the mailing list: problem with virtualhosts. The line: ProxyPassReverse /z http://www.deeldrie.nl:8080/deeldrie should be in this example: ProxyPassReverse /z http://www.myserver.nl:8080/myserver regards, Wouter ___ 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] Lock and Transaction in Zope.
I think I know how to manage transactions in Zope, but I don't know how to lock Zope resources for multiple requests. For example : I have a DTML Method, called "transac1", which looks like this : "waiting 10 seconds..." wait_10_seconds is an External Method that sleeps for 10 seconds. In the other hand, I have another method, called "transac2" : In the parent Folder, there's a property called "var" which I use in these methods. It has an initial value of 0. The point is : if I call the first method, and while it's sleeping, I call the second one (from another window, for example), it doesn't work properly. The first one crashes, and doesn't finish right. The final "var" value is 2. I want to know if there is any way to lock the folder, and its properties, so no one can access to it until my method "transac1" finishes, and where can I find information about locking resources in Zope.
Re: [Zope] re module & through the web security
On Wed, 6 Sep 2000, Chris Withers wrote: > Chris McDonough wrote: > > There's the perception at DC that > > 're' isn't appropriate for through-the-web usage because it's possible to > > write and use regex that sends the Python interpreter thread it's > > operating within into a neverending loop. Sorry. > > Am I the only one who thinks this is silly? Probably not. > > One of Zope's key strengths is its granular security, right? > So why isn't it the reponsibility of the site > designer/maintainer/owner/whatever to ensure that only people he trusts > have the ability to write DTML? It is. > > It seems like that perception is hobbling Python Methods, in particular, > by removing useful stuff like the re module because the assumption is > being made that people editing TTW code will be untrusted. TTW people are implicitly untrusted. This is core to the security model. > > IMH(umble), either you don't have confidence in Zope's security, or > you're assuming your users are stupid (that may be fair for a lot of us, > but still ;-) I dont think either statement is true. It is because there are restrictions that Zope TTW scripting is "safe." It's designed to be more safe than expressive. Chris McDonough Digital Creations, Publishers of Zope http://www.zope.org ___ 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] ANN: Serving PHP/Perl from Zope update
I had to dig a level deeper to support phorum (www.phorum.org), a PHP message board app. Here's my update to handle cookies, redirection, POST variables, and relative links. I'm new to python, so if I've done anything awkwardly, please let me know the more elegant way. First, a patch to Client.py - first part doesn't die on redirects and returns (instead of raising 'Redirect') so cookies and base can be set, second part opens a hole to pass headers into Client (for cookies) 224c224 < if ec==200: return (headers,response) --- > if ec==200 or ec==302: return (headers,response) 342,344c342,344 < def call(url,username=None, password=None, **kw): < < return apply(Function(url,username=username, password=password), (), kw) --- > def call(url,username=None, password=None, headers={}, **kw): > F = apply(Function, (url, (), None, username, password, None), headers) > return apply(F, (), kw) Then there's the rewrite of the code in the how-to. Here's the whole thing (I use just one .py) site = 'http://www.carbonecho.com/zforum' from string import join def DirectToPHP( self ): if self.REQUEST.path: # Build up a list of what is contained in self.REQUEST.path since # you are going to redirect the user to /PHPContent/index_html. Start # by adding the way you can access the PHP tree outside of Zope originalRequestPath = [site] # keep the original path to override base when serving origPath = [] # is the user asking for a php script? if self.REQUEST.path[0][-4:] == '.php': # I use .php, not .php3 # pop paths of REQUEST.path until its empty while self.REQUEST.path: # Remember the path components before you pop them # hang on to passed in path to set as base when served originalRequestPath.append( self.REQUEST.path[-1] ) origPath.append( self.REQUEST.path[-1] ) self.REQUEST.path.pop() # Create a full url to pass to index_html phpScript = join( originalRequestPath, '/' ) origScript = join( origPath, '/' ) # Is there a query string being passed to the script also? if self.REQUEST.environ.has_key('QUERY_STRING'): phpScript = phpScript + '?' + self.REQUEST.environ['QUERY_STRING'] origScript = origScript + '?' + self.REQUEST.environ['QUERY_STRING'] # self.REQUEST.path is now empty so the user is going to be # directed to /forum/index_html. That method needs to # know what the original request is, so pass it a REQUEST # variable self.REQUEST.set('phpScript', phpScript) self.REQUEST.set('origScript', origScript) # you also may want to redirect image requests to the PHP tree elif self.REQUEST.path[0][-3:] in ['gif', 'png', 'jpg']: originalRequestPath = [site] while self.REQUEST.path: originalRequestPath.append(self.REQUEST.path[-1]) self.REQUEST.path.pop() # This is an image, so give it to a DTMLMethod that will # just serve up images self.REQUEST.path.append('ServeImage') self.REQUEST.set('imagePath', join(originalRequestPath, '/')) from ZPublisher import Client from string import split def ServePHP(self, username=None, password=None): req = self.REQUEST if req.environ.has_key('HTTP_COOKIE'): headers = {'Cookie' : req.environ['HTTP_COOKIE']} else: headers = {} if req.environ['REQUEST_METHOD'] == 'POST': rTuple = apply(Client.call, (req['phpScript'], username, password, headers), req.form) else: rTuple = Client.call(req['phpScript'], username, password, headers) resp = req['RESPONSE'] for cookie in rTuple[0].getallmatchingheaders('Set-Cookie'): cookie = cookie[:-1] apply(resp.setHeader, split(cookie, ':', 1)) # not a particularly strong test, maybe Client should pass back status if rTuple[0].has_key('location'): # override base so that relative references work resp.base = rTuple[0]['location'] raise 'Redirect', resp.base #override base so that relative references work resp.base = 'http://www.carbonecho.com/forum/' + req['origScript'] return rTuple[1] from ZPublisher import Client def ServeImage(self): return Client.call(self.REQUEST['imagePath'])[1] ___ 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] Buying Zope for 139 German Marks - It´s cheap
Hallo all, maybe its old new´s - maybe not: Zope is part of "SuSE Linux 7.0 Profesional Edititon" and this is printed on the box in the categorie "Features and Highlights". It is indeed a Highlight. Regards Harald ___ 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 module & through the web security
From: Chris Withers <[EMAIL PROTECTED]> > One of Zope's key strengths is its granular security, right? > So why isn't it the reponsibility of the site > designer/maintainer/owner/whatever to ensure that only people he trusts > have the ability to write DTML? Fear not. In the brand new shiny PythonMethods Product coming soon (really!) to a Zope near you, you will have the ability to say: ModuleSecurityInfo('re').protect('compile', 'Use the "re" module') ...and suddenly anyone to whom you grant 'Use the "re" module' permission will be able to 'from re import compile' in their Python Methods. Anyone else will be able to 'import re', but not access any of its contents. Cheers, Evan @ digicool & 4-am ___ 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] Form Validation
I can't answer your question but have been looking for similar information. Where can I find out more about ":string" and so forth. I haven't been able to locate any information on validation.. Thanks -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Andreas Pauley Sent: Wednesday, September 06, 2000 1:25 AM To: Zope Subject: [Zope] Form Validation Hi, I see you can let Zope do basic form validation for you by appending ":string" or ":int" to your form name. The error messages that are displayed are not that clear, however. How can I get more control over what happens when an error occurs? (e.g. I'd like to be able to get back a list/ditionary of errors instead of handling them one by one) Where can I get documentation on all the built-in form validation options at my disposal? (e.g. a field may not be required, but if it is filled in it has to be an integer) Is Zope's built-in form validation sufficient for a complex system? Are there better ways to do form validation? I saw a php program on freshmeat.net the other day that supposedly generates forms complete with client and server-side validation. Do we have a similar product in Zope? Thanks, Andreas. -- In a world without fences, who needs gates? ___ 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] re module & through the web security
Chris Withers writes: > Chris McDonough wrote: > > There's the perception at DC that > > 're' isn't appropriate for through-the-web usage because it's possible to > > write and use regex that sends the Python interpreter thread it's > > operating within into a neverending loop. Sorry. [snip] > It seems like that perception is hobbling Python Methods, in particular, > by removing useful stuff like the re module because the assumption is > being made that people editing TTW code will be untrusted. I think the re module is a good example for arguing that DTML and Python Methods should have different criteria for deciding what modules are available (and separate permissions for users, if they don't already). Somehow, the idea of mixing regexps and DTML gives me chills, but I agree that it is a perfectly reasonable tool to want to use in Python Methods. This relates more the crusade to depricate DTML programming as opposed to DTML report writing than it does to security concerns. ___ 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 module & through the web security
If you're concerned about the availability of various modules within PythonMethods, you should participate in the PythonMethods project wiki, probably at the page http://dev.zope.org/Wikis/DevSite/Projects/PythonMethods/CurrentIssues. > -Original Message- > From: Dan L. Pierson [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 06, 2000 10:14 AM > To: Chris Withers > Cc: Chris McDonough; T.J. Mannos; Marcus Mendes; [EMAIL PROTECTED] > Subject: Re: [Zope] re module & through the web security > > > Chris Withers writes: > > Chris McDonough wrote: > > > There's the perception at DC that > > > 're' isn't appropriate for through-the-web usage because > it's possible to > > > write and use regex that sends the Python interpreter thread it's > > > operating within into a neverending loop. Sorry. > > [snip] > > > It seems like that perception is hobbling Python Methods, > in particular, > > by removing useful stuff like the re module because the > assumption is > > being made that people editing TTW code will be untrusted. > > I think the re module is a good example for arguing that DTML and > Python Methods should have different criteria for deciding what > modules are available (and separate permissions for users, if they > don't already). > > Somehow, the idea of mixing regexps and DTML gives me chills, but I > agree that it is a perfectly reasonable tool to want to use > in Python Methods. > This relates more the crusade to depricate DTML programming > as opposed > to DTML report writing than it does to security concerns. > > ___ > 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] Buying Zope for 139 German Marks - It´s cheapp
On Wed, Sep 06, 2000 at 05:01:38PM +0200, Harald Koschinski wrote: > maybe its old new´s - maybe not: > > Zope is part of "SuSE Linux 7.0 Profesional Edititon" and > > this is printed on the box in the categorie "Features and Highlights". > It is indeed a Highlight. Got a better buy: www.lob.de sells Debian 2.2 for 39,90 DM: The description in the online shop also mentions that Zope is included. IIRC, the LinuxLand Debian box also featured Zope. Just to be fair: Zope is also included since a while in Redhat's PowerTools add-on package. I guess SuSE had no choice anymore ;-) Gregor ___ 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] INSTANCE_HOME problems...
Hello all, I have followed 4am's INSTANCE-HOME How-To, and have set up a Zope Instance. I created the var, import, Extensions and Products directories from scratch. I then put a new product in the new instance's Products directory. When I start my new Zope instance, it sees all of the products that are installed in the base Zope installation, but not the new product in the instance's Products directory. If I put the new product in the base Zope installation, then my new instance sees it. Based on my understanding of the INSTANCE_HOME How-To, I should be able to have separate products in the instance's Products directory, right? Any help on this is greatly appreciated! If you could, please cc: any responses to my email address ([EMAIL PROTECTED]) as well as the list, since I am in digest mode. Thanks! BTW, I'm running Zope 2.2.1 on linux2. Thanks again folks, Will Dennis P-Wave, Inc. ___ 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] supplemental group ids (Linux)
>OK, something is not quite right here. >On my unmodified zope, it is properly 'sandboxed'. Perhaps it is the use of >the explicit '-u nobody'? I don't do that on >my system, which causes Zope to run as nobody implicitly. > >(When started as root, unless told otherwise, zope will switch to nobody). > >Try running without the 'u nobody switch, and see what happens. Just out of >curiousity. No difference. I think the point is that Zope does not make any initgroups(3) calls; this will be a problem if the particular system needs it. I have two such systems: Linux 2.2.16 + glibc-2.1.2 NetBSD 1.4 Having reviewed the kernel and libc sources in both cases, I am convinced that set*gid and {init,set,get}groups operate totally independently. At minimum, initgroups is used by login/su to set the primary gid found in /etc/passwd, plus any additional gids associated with the uid in /etc/group, as supplemental gids. Thus, even if there are no supplemental gids in /etc/group, you still have the primary gid in the kernel's list of supplementals. So the primary gid occurs initially in 3 places: the real and effective gids, and one of the supplemental gids. You must get all 3; setgid for real and eff, initgroups for sup. (Additionally in linux you have the `saved' gid and the fsgid, but setgid will modify them.) Under this hypothesis, my question is how could _your_ system work? Why is it that you don't have the original primary gid lingering in the supplemental list? ___ 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] Proxy roles don't propagate? - bizzare permissions from ZDChart too
I'm using LoginManager and the loginForm cookie method for security. I want my login form to use the same standard_html_header, stylesheet and so on as my system. My hierarchy is / Strader StyleSheet acl_Users loginForm I've denied anonymous access to Strader and so on, but I want the loginForm to be able to load standard_html_header, which in turn references a few things in Strader Anyway, my loginForm has this: I've given the loginForm a proxy role called "Customer" Customer has full access to Strader and everything in it. It looks like standard_html_header is rendered, but when standard_html_header calls StyleSheet and other objects in the Strader folder, I get the browser login box. Cancelling that shows "access to StyleSheet denied". Its as if the proxy role assigned to loginForm is discarded by standard_html_header, even though I didn't assign standard_html_header any proxy roles. Is this a bug, or by design? -- Also, I see that I have some very strange permissions in my list, looks like an installed product goofed. I see this single character permissions. A C D G Z a d h r s t Ahh.. Looks like ZGDChart hasn't used a tuple where it should... Brad Clements,[EMAIL PROTECTED] (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com AOL-IM: BKClements ___ 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] INSTANCE_HOME problems...
From: Will Dennis <[EMAIL PROTECTED]> > I have followed 4am's INSTANCE-HOME How-To, and have set up a Zope > Instance. I created the var, import, Extensions and Products directories > from scratch. I then put a new product in the new instance's Products > directory. When I start my new Zope instance, it sees all of the > products that are installed in the base Zope installation, but not the > new product in the instance's Products directory. Some sanity checks: - You're starting Zope from inside the INSTANCE_HOME, right? - Can you verify that the Data.fs in the INSTANCE_HOME's var is the one being used? - Can you import from INSTANCE_HOME/import? Cheers, Evan @ digicool & 4-am ___ 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: ZClass Bug (was: Re: [Zope] How to access id and title of document calling standard_html_header)
- Original Message - From: "Dieter Maurer" <[EMAIL PROTECTED]> To: "Tim Hicks" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, September 05, 2000 9:44 PM Subject: ZClass Bug (was: Re: [Zope] How to access id and title of document calling standard_html_header) > > The analysis provides a workaround for you. > In your ZClass constructor, add > > before the > .createInObjectManager(REQUEST['id'],REQUEST)"> > Dieter, I tried using the code that you suggested above, but I get the following error from Zope 2.2.1 File C:\PROGRA~1\Zope221\lib\python\DocumentTemplate\DT_With.py, line 133, in render (Object: theatre_class.createInObjectManager(REQUEST['id'], REQUEST)) File C:\PROGRA~1\Zope221\lib\python\DocumentTemplate\DT_Util.py, line 337, in eval (Object: theatre_class.createInObjectManager(REQUEST['id'], REQUEST)) (Info: REQUEST) File, line 0, in ? NameError: theatre_class It would seem that is still raising its head. Any ideas? tim ___ 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] Cut down on the Available Objects list.
Hi, all. When I create ZClasses I can make the Available Objects shrink to just a couple of available objects via subclasses and so forth. How would I do this with a Python Class in a Python Zope Product? (Let's say an OFS.Folder.Folder class, which would normally could contain all available objects.) 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] ANN: Serving PHP/Perl from Zope update
Got authorization to work! First, another patch to Client.py to raise 'Unauthorized' when 401 is returned by PHP/Perl: after line that starts with if ec==200 add if ec==401: raise 'Unauthorized' Second, numerous changes to the external method that makes the request and receives the response. Here's the whole thing def ServePHP(self): req = self.REQUEST (username, password) = req._authUserPW() headers = {} if req.environ.has_key('HTTP_COOKIE'): headers = {'Cookie' : req.environ['HTTP_COOKIE']} if req.environ.has_key('HTTP_USER_AGENT'): headers = {'User-Agent' : req.environ['HTTP_USER_AGENT']} if req.environ['REQUEST_METHOD'] == 'POST': rTuple = apply(Client.call, (req['phpScript'], username, password, headers), req.form) else: rTuple = Client.call(req['phpScript'], username, password, headers) resp = req['RESPONSE'] # the first element of the return tuple is dervied from rfc822 for cookie in rTuple[0].getallmatchingheaders('Set-Cookie'): cookie = cookie[:-1] # remove \n - is there an idiom for this? apply(resp.setHeader, split(cookie, ':', 1)) # not a particularly strong test, maybe Client should pass back status if rTuple[0].has_key('location'): # override base so that relative references work resp.base = rTuple[0]['location'] raise 'Redirect', resp.base #override base so that relative references work resp.base = 'http://www.carbonecho.com:10080/forum/' + req['origScript'] return rTuple[1] ___ 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] ANN: Serving PHP/Perl from Zope update
oops! that should be username, password = req._authUserPW() ___ 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-Perl] Send me your Perl Methods
Or maybe using a perl module that doesnt exist in Python? I was looking at MP3::Napster the other day but Im stuck on Windows. - Original Message - From: "Gisle Aas" <[EMAIL PROTECTED]> To: "Michel Pelletier" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, September 06, 2000 1:33 PM Subject: Re: [Zope-Perl] Send me your Perl Methods > Michel Pelletier <[EMAIL PROTECTED]> writes: > > > Gisle Aas wrote: > > > > > > > > > I'm also looking for interesting examples :-) > > > > > > Do you have any interesting PythonMethod examples? I can probably > > > translate it to perl for you. > > > > Yes, I thought that was a good approach. I don't really have any good > > python methods either, but I can come up with some. > > > > Here's an algorithm I did in the Globbing Lexicon component of Zope. > > This turns a string into 'digrams' Which is a common wild-card searching > > datastructure. So: > > > > bob => ['$b', 'bo', 'ob', 'b$'] > > python => ['$p', 'py', 'yt', 'th', 'ho', 'on', 'n$'] > > > > Dollar signs mark the beginning and ending of the word. > > > > def digram(word): > > """ """ > > digrams = [] > > digrams.append('$' + word[0]) # mark the beginning > > > > for i in range(len(word)): > > digrams.append(word[i:i+2]) > > > > digrams[-1] = digrams[-1] + '$' # mark the end > > > > return digrams > > > > There's probably a better way to do it in Python, and this should be > > Perl's forte. Can someone come up with a reasonably cool Perl method > > that did this? > > sub digram { >my $word = shift; >my @digrams; >push(@digrams, '$' . substr($word, 0, 1)); >push(@digrams, substr($word, $_, 2)) for 0 .. length($word)-1; >$digrams[-1] .= '$'; >return \@digrams; > } > > I'm not so sure about this being perl's forte. There was no way to > use regular expressions here :-) > > I would actually like to see some methods that interact more with the > Zope environment. > > Regards, > Gisle > > ___ > Zope-perl maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope-perl > ___ 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] INSTANCE_HOME problems...
Thanks for replying so quickly, Evan! Evan Simpson wrote: > > Some sanity checks: > > - You're starting Zope from inside the INSTANCE_HOME, right? Yes, just as in the How-To instructions. I can provide you with the start script if necessary. > > > - Can you verify that the Data.fs in the INSTANCE_HOME's var is the one > being used? > Yes, the Database Management page in Control Panel says the location is my instance path (/home/zope/p-wave/var/Data.fs) whereas the "base" Zope installation is in /usr/local/zope. > > - Can you import from INSTANCE_HOME/import? > Yes, just tried it and it does import products fine (just imported a self-written product we had exported from another Zope installation.) > > Cheers, > > Evan @ digicool & 4-am Thanks again, Will ___ 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] ZDebug Wizzard interference
Shane wrote > > > http://www.zope.org/Members/hathawsh/ZDebug/index_html > > ZDebug is a set of patches to Zope that help in the deciphering of DTML > errors and authorization exceptions. Because this is the first > release, remember to make a backup before installing. Looks like ZDebug does not work to well with wizards -- I suspect because of ZCallable. I am using a PTK snapshot from today, latest Zope. Did a test with and w/o ZDebug. Wizard works fine w/o. By the way I like where ZDebug is going! This is what happens when you ad a portal An exception occurred in a DTML method or document. Error type: exceptions.IndexError Error value: list index out of range Innermost method: /vpatch/PortalWizard/wizard_fillin_fields Namespace Stack (innermost entry at top) ID Type (N/A) mapping with keys: ['document_id', 'document_title'] (N/A) mapping with keys: ['document_id', 'document_title'] PortalWizard InstanceDict REQUEST ZPublisher.HTTPRequest.HTTPRequest Source of /vpatch/PortalWizard/wizard_fillin_fields with fault: "> vPatch Home | Products, Services, and Solutions | Testimonials | Investor Relations | Demos | Login/Registration | Learning Center | Contact Us Traceback (innermost last): File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 187, in publish File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: RoleManager) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 171, in publish File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: index_html) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/App/Factory.py, line 178, in index_html (Object: RoleManager) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Products/ZCallable/__init__.py, line 101, in __call__ (Object: Traversable) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/OFS/DTMLMethod.py, line 172, in __call__ (Object: index_html) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Products/ZDebug/DTMLLocator.py, line 103, in __call__ (Object: index_html) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: index_html) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Products/ZDebug/DTMLDebug.py, line 213, in debug_render_blocks File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Products/ZDebug/DTMLDebug.py, line 210, in debug_render_blocks File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/OFS/DTMLMethod.py, line 168, in __call__ (Object: wizard_fillin_fields) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Products/ZDebug/DTMLLocator.py, line 103, in __call__ (Object: wizard_fillin_fields) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_String.py, line 528, in __call__ (Object: wizard_fillin_fields) File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Products/ZDebug/DTMLDebug.py, line 259, in debug_render_blocks File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Products/ZDebug/DTMLDebug.py, line 192, in debugException (Object: pagevars="_.getattr(wizard_pages[wizard_index], 'wizard_variables', [])") File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/Products/ZDebug/DTMLDebug.py, line 257, in debug_render_blocks File /users/hog/software/zope/Zope-2.2.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_Let.py, line 146, in render (Object: pagevars="_.getattr(wizard_pages[wizard_index], 'wizard_variables', [])")
Re: [Zope] INSTANCE_HOME problems...
Hello all, OK, shoulda tried other products before posting... We just installed two products (LocalFS and ZSMime) in the given instance's Products folder, and they appear in the instance, just as they should! For some reason, however, WorldPilot doesn't show up unless I install it in the base Zope's Products folder... Guess I'll have to email the N&H guys (unless they're on this list!) Thanks for your help, anyways... I'll do more testing next time. Will ___ 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] Set Access Rule wish
Its nice that the icon for the method, who is the access rule's target, is changed. However, I think also there needs to be some indicator on the folder involved as well. Over the long weekend, I had accidentally set an access rule (for URL-based SQLSession ID) in the proper folder and also a subfolder (to the same method). Took me several days to discover that other access rule had been set in the subfolder. When your you have mistakes with this kind of stuff, I can be madding and any kind of indicators would be useful. 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 )
[Zope] Re: [ZCommerce] Shopping application for Chinese Restaurant ?
Have you looked at Etailer? It is easy to adapt its python code. Dominic Lakatos wrote: > Dear all, > > we intend to build an online menu card for a Chinese restaurant > (preferably multilingual). Please give us some orientation which of the existing and > free Zope application will make this task easiest ? > > Desired functionalities: > - online ordering by customers > - to be used for in-house accounting ("table 4 had 2 dishes of dumplings > on 24 Oct") > - multilanguage support would be nice > - should allow editing of prices and offers by authenticated maintainer > - should be modular and extensible, as this may be a longer relationship > > We are not afraid of adapting "raw" python where useful. > > Which of the current codebase comes closest to this ? Emarket ? Zcommerce > ? Or would sb rather advocate a non-python solution (minivend comes to our > mind)? > > TIA, > > -- > Dominic Lakatos and Holger Blasum > weigl !interService, Munich, Germany > > Sent through GMX FreeMail - http://www.gmx.net > > ___ > ZCommerce Mailing List - [EMAIL PROTECTED] > http://lists.codeit.com/mailman/listinfo/zcommerce -- Terry Kerr ([EMAIL PROTECTED]) Adroit Internet Solutions Pty Ltd (www.adroit.net) Phone: +613 9563 4461 Fax: +613 9563 3856 Mobile: +61 414 938 124 ICQ: 79303381 ___ 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] DateTime.now().iso_week
In Zope, I need to get the results of the command in the subject. Unfortunately (and somewhat irritatingly...), Zope doesn't seem to use the mxDateTime package, and thus, _.DateTime does _not_ have it. Anyone know how I would go about getting it? Without using an External method? -- Bill Anderson (ARC)Unix/Linux System Administrator HPSO Engineering Productivity Team Wednesday, September 06, 2000 Random Quote: Why can't women put the toilet seat back up? ___ 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] Major problem involving Multiple zopes on one machine
This is happening on an HP-UX 11.0 machine. Setup: Two Zope installs, TWO IP adresses. Each install has the -a xx.xx.xx.xx address option passed via the standard start script. problem: occasionally, while working on one, I wind up actually working on the other. Clarification: While in the manage screen for ServerA, I occasionally see the management screen for ServerB. Even wihtout being logged into ServerB. (IE. clean browser session) This sucks. -- Bill Anderson (ARC)Unix/Linux System Administrator HPSO Engineering Productivity Team Wednesday, September 06, 2000 Random Quote: (A)bort, (R)etry, (S)elf-destruct? ___ 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] Major problem involving Multiple zopes on one machine
Bill Anderson wrote: > Clarification: > While in the manage screen for ServerA, I occasionally see the > management screen for ServerB. Even wihtout being logged into ServerB. > (IE. clean browser session) I have 5 zopes on the same machine & i have never noticed this problem. do the different ip's have different names? what do you get from when you start as far as computing default hoistname goes? ~mindlace ___ 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] Major problem involving Multiple zopes on one machine
ethan mindlace fremen wrote: > > Bill Anderson wrote: > > > Clarification: > > While in the manage screen for ServerA, I occasionally see the > > management screen for ServerB. Even wihtout being logged into ServerB. > > (IE. clean browser session) > > I have 5 zopes on the same machine & i have never noticed this problem. > do the different ip's have different names? what do you get from when > you start as far as computing default hoistname goes? > > ~mindlace As I sit here and play with it, it seems to happen when I restart zope from within the Control panel. I'll look up the hostname part in a few minutes ... I can't restart the server just yet. IIRC, they came up with the correct hostnames ... -- Bill Anderson (ARC)Unix/Linux System Administrator HPSO Engineering Productivity Team Wednesday, September 06, 2000 Random Quote: The world is a stage, but the play is badly cast. ___ 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] supplemental group ids (Linux)
Kip Rugger wrote: > > >OK, something is not quite right here. > >On my unmodified zope, it is properly 'sandboxed'. Perhaps it is the use of > >the explicit '-u nobody'? I don't do that on > >my system, which causes Zope to run as nobody implicitly. > > > >(When started as root, unless told otherwise, zope will switch to nobody). > > > >Try running without the 'u nobody switch, and see what happens. Just out of > >curiousity. > > No difference. > > I think the point is that Zope does not make any initgroups(3) calls; > this will be a problem if the particular system needs it. > > I have two such systems: > > Linux 2.2.16 + glibc-2.1.2 > NetBSD 1.4 ... > Under this hypothesis, my question is how could _your_ system work? > Why is it that you don't have the original primary gid lingering in > the supplemental list? Not sure. Here is my setup: glibc 2.1.3 Kernel 2.2.15 heavilly modified Redhat 6.2 base. Perhaps it is the kernel? I also have a 2.2.16 (2.1.3 glibc) kernelled machine which exhibits the behavior you see on yours.. I can try it on a 2.2.4test6 kernel too ... -- 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] re module & through the web security
Evan Simpson wrote: > > From: Chris Withers <[EMAIL PROTECTED]> > > One of Zope's key strengths is its granular security, right? > > So why isn't it the reponsibility of the site > > designer/maintainer/owner/whatever to ensure that only people he trusts > > have the ability to write DTML? > > Fear not. In the brand new shiny PythonMethods Product coming soon > (really!) to a Zope near you, you will have the ability to say: > > ModuleSecurityInfo('re').protect('compile', 'Use the "re" module') > > ...and suddenly anyone to whom you grant 'Use the "re" module' permission > will be able to 'from re import compile' in their Python Methods. Anyone > else will be able to 'import re', but not access any of its contents. Now THAT! Rocks! -- 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 )
[Zope] Whitespace in lines property
Can anyone tell me why when I edit a lines property I get leading whitespace inserted? The first line gets seven & each one after that gets 10 spaces. I tried stripping it out but this didn't seem to have any effect. ... ... Thanks, -- Tim Cook -- FreePM Project Coordinator http://www.freepm.org OS Health Care Alliance Supporter http://www.oshca.org ___ 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] ANN: Serving PHP/Perl from Zope update
oops, again :-( headers = {} if req.environ.has_key('HTTP_COOKIE'): headers['Cookie'] = req.environ['HTTP_COOKIE'] if req.environ.has_key('HTTP_USER_AGENT'): headers['User-Agent'] = req.environ['HTTP_USER_AGENT'] Also on my member page - http://zope.org/Members/billw/morePHP ___ 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] Whitespace in lines property
Hi Tim, Tim Cook wrote: > > Can anyone tell me why when I edit a lines property I get leading > whitespace inserted? > The first line gets seven & each one after that gets 10 spaces. > > I tried stripping it out but this didn't seem to have any effect. > > ... > > > > ^^^ here^here > ^ here^here > ^^^here ^ here > > > here marks your whitespaces. try: Ugly code, but... HTH Tino ___ 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] Whitespace in lines property
Tino Wildenhain wrote: > > Hi Tim, > > Tim Cook wrote: > > > > Can anyone tell me why when I edit a lines property I get leading > > whitespace inserted? > > The first line gets seven & each one after that gets 10 spaces. > > > > I tried stripping it out but this didn't seem to have any effect. > > > > ... > > > > > > > > > ^^^ here^here > > > ^ here^here > > > ^^^here ^ here > > > > > > > > here marks your whitespaces. > > try: > > > "_.string.strip(cur_item)"> > > > Ugly code, but... > Well, "realize something NEW everyday!" It never crossed my mind that the space between my code elements would be rendered. DUH! Thanks, -- Tim Cook -- FreePM Project Coordinator http://www.freepm.org OS Health Care Alliance Supporter http://www.oshca.org ___ 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] Whitespace in lines property
On Thu, Sep 07, 2000 at 07:46:57AM +0200, Tino Wildenhain wrote: > > > here marks your whitespaces. > > > > > > try: > > > > > > > > > > > "_.string.strip(cur_item)"> > > > > > > > > > Ugly code, but... > > > > Well, "realize something NEW everyday!" > > It never crossed my mind that the space between my code elements > > would be rendered. DUH! > > Hehe ;) I'm currently playing with a clean-up tag, to remove > whitespaces/empty > lines in code. May be I release it, if its fully done. Stay tuned ;-) I used to get bitten an awful lot by doing: This would cause the spaces to appear _before_ the header information and actually just come up with error messages. Took me some very frustrating hours to realise I just had to get rid of the spaces and format things really badly to fix it. > Regards > Tino -- Evan ~ThunderFoot~ Gibson~ nihil mutatem, omni deletum ~ All of us are God's creatures... just some are more creature than others. ___ 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] Whitespace in lines property
Hi Tim, Tim Cook wrote: > > Tino Wildenhain wrote: > > > > Hi Tim, > > > > Tim Cook wrote: > > > > > > Can anyone tell me why when I edit a lines property I get leading > > > whitespace inserted? > > > The first line gets seven & each one after that gets 10 spaces. > > > > > > I tried stripping it out but this didn't seem to have any effect. > > > > > > ... > > > > > > > > > > > > > > ^^^ here^here > > > > > ^ here^here > > > > > ^^^here ^ here > > > > > > > > > > > > > here marks your whitespaces. > > > > try: > > > > > > > "_.string.strip(cur_item)"> > > > > > > Ugly code, but... > > > > Well, "realize something NEW everyday!" > It never crossed my mind that the space between my code elements > would be rendered. DUH! Hehe ;) I'm currently playing with a clean-up tag, to remove whitespaces/empty lines in code. May be I release it, if its fully done. Stay tuned ;-) Regards Tino ___ 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-dev] date formatting / extracting substrings
Hi Jeff, (I've moved this to the Zope list out of Zope-Dev) ... do something with the result ... Have a look at the Python documentation as it relates to "slicing". > -Original Message- > From: Jeff Nielsen / Ugo Fast [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 07, 2000 1:10 AM > To: Zope-Dev@Zope. Org > Subject: [Zope-dev] date formatting / extracting substrings > > > Hello out there in Zope world! > > Again, I'm completely baffled by Zope and the docs are no > help either. I'm > trying to take an input of a date in the form MM as the > variable MonthID > and create a string in the form Month, as a variable > named MonthName. > For instance, a MonthID of 29 should return a MonthName > of "September, > 2000". > > I've been looking in the docs and the emails, but I can't > figure out how to > extract substrings. I think something like this should work > to seperate the > month value from the MonthID, but it doesn't: > > > > Any guidance would be appreciated. > > --- > Jeff Nielsen > http://www.UgoFast.com/ > "Where U Go Fast" > > > ___ > 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 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 )