[Zope-Annce] [ANN] iungo released to the wild...
Hi to all, today I decided to release iungo to the world-wild-world... iungo was already announced at the German Zope User Group (DZUG) some weeks ago, but today I started and finished translating most of the docs to english for a broader audience. The tutorial is still missing, but I'll do this in the next days too. What is iungo? -- Based on the web-application-server Zope iungo provides a solid system to build up object-oriented web-databases, easy-to-use-wikis, content-, document- and knowledge-management-systems. iungo targets users and developers, who trust in the Keep it simple-philosophy and want to maintain control over their work. iungo tries to connect people with information. Features? - - Strict separation of content and application: your content can be moved between different zope-instances and iungo-versions without the fear of breaking anything. - Folderish-Content: In the web all entities are links, not folders, documents or files... no more headaches for users what content-type to use... in the default iungo-install there's only one for all...;) - Placeless-Content: All objects have a unique id (autogenerated per default) and can be moved around within the repository without breaking any links between objects. - KISS (Keep it simple stupid): It's easy to develop a custom layout with a basic knowledge of DTML or ZPT. - Expandable: Create new content-types for webdatabases with some clicks in the ZMI. Where can I find more info about iungo? --- http://www.iungo.org/ If you have questions, feel free to ask me: [EMAIL PROTECTED] Keep zoped, Maik ___ Zope-Announce maillist - Zope-Announce@zope.org http://mail.zope.org/mailman/listinfo/zope-announce Zope-Announce for Announcements only - no discussions (Related lists - Users: http://mail.zope.org/mailman/listinfo/zope Developers: http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope-dev] Re: Move Zope trunk to ZODB 3.5
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tim Peters wrote: If there are no sane wink objections, I'd like to move Zope trunk to using ZODB 3.5 tomorrow (Friday). Zope3 has been using ZODB 3.5 for months, and the intent has been that the ZODB 3.4 line survive for the sake of the Zope 2.8 line (as the ZODB 3.2 line survives for the sake of the Zope 2.7 line). Having Zope 2.9 and Zope3 use the same ZODB version should make sharing of Zope code across versions easier, allow 2.9 to exploit new ZODB features, and enable both Zopes to use the same, new zpkg-based build mechanisms. +1. A related changed would happen soon after (probably also on Friday): the ExtensionClass-based Persistence package still lives in the ZODB part of the repository, despite that it can't even be compiled from a ZODB checkout (the prerequisite ExtensionClass implementation lives in the Zope part of the repository). So the plan there is to remove the svn:externals stitching Persistence into Zope from ZODB, and move the Persistence package from ZODB trunk to Zope trunk. In all, this one is just minor fiddling, but sane objections to this are welcome too. +1 for that, too. Maybe-insane-but-not-crazy-enough-to-argue-with-timbot'ly, Tres - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDDix6+gerLs4ltQ4RAlRoAJ4yPJBc18c2qC1Ha52jV855u/6AggCgupqB wNihskKC52Ur1dKnqJSQBaM= =+1Xo -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Puzzling change to guarded_getitem in Zope 2.8
I'm migrating our 2.7-developed Product to 2.8. The following change has me puzzled. In 2.7, AccessControl.ZopeGuards guarded_getitem has the following code: def guarded_getitem(object, index): [ snip handling of slices ] ... v = object[index] if Containers(type(object)) and Containers(type(v)): # Simple type. Short circuit. return v if getSecurityManager().validate(object, object, index, v): return v raise Unauthorized, 'unauthorized access to element %s' % `i` note the use of index in the validate call. In 2.8, this appears as: def guarded_getitem(object, index): [ snip handling of slices ] ... v = object[index] if Containers(type(object)) and Containers(type(v)): # Simple type. Short circuit. return v if getSecurityManager().validate(object, object, None, v): return v raise Unauthorized, 'unauthorized access to element %s' % `i` where index has become None. This would appear to imply that we can't perform access controls on a per-item basis in sequences or mappings, unless we do so in the actual __getitem__ method, which implies there's no such thing as trusted code. We have an access policy implementation of: def _checkAccess(self, name, value): if name.startswith('CG'): return 1 if self.isValidAggregateName(name): return 1 return 0 security.setDefaultAccess(_checkAccess) which obviously doesn't work any more, since name is never a item name, it's always None. Richard pgpj6UDo2aBsA.pgp Description: PGP signature ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Puzzling change to guarded_getitem in Zope 2.8
On Fri, 26 Aug 2005 10:00 am, Richard Jones wrote: I'm migrating our 2.7-developed Product to 2.8. The following change has me puzzled. In 2.7, AccessControl.ZopeGuards guarded_getitem has the following code: OK, Tres made the change, with the relevant bit of the log message being: Iteration over sequences could in some cases fail to check access to an object obtained from the sequence. Subsequent checks (such as for attributes access) of such an object would still be performed, but it should not have been possible to obtain the object in the first place. List and dictionary instance methods such as the get method of dictionary objects were not security aware and could return an object without checking access to that object. Subsequent checks (such as for attributes access) of such an object would still be performed, but it should not have been possible to obtain the object in the first place. So I presume that the change *intended* to move the onus of validation from the guarded_getitem method to the __getitem__ method of the container? No more trusted access to custom (ie. not builtin) sequence/mapping objects? Richard pgp0vUWOLplhT.pgp Description: PGP signature ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope] REQUEST.has_key does not find passed argument
Hello, I'm new to Zope, Python and DTML and could therefore use some help. I have a page in which I want to pass an argument to a new DTML method when clicking a link. The relevant snippet is: a href=/contact?name_id:int=dtml-var name_idContact/a So, when you click on Contact you should get a new window. The variable name_id is previously established on the page and shows up correctly when the pointer hovers over the link, i.e. the status bar at the bottom of the browser reads: http://server.website.edu/contact?name_id:int=3 However, the DTML code for the new page doesn't seem to find this value and returns a message telling me that no name was found. Because I am stuck, here is the virtual entirety of the code: dtml-if not REQUEST.has_key('name_id') No name was found. Please specify a name. dtml-else Thank you! The request has been made. /dtml-if How can I get this page to recognize the passed argument so I can call a method with it? I have seen similar threads here on this topic but was unable to find a solution from reading them. I am also baffled by the fact that in large part I'm reusing the same code that seems to work perfectly in the same format on other pages (which I didn't write). This is probably something very simple, but I would really appreciate a hand. Thanks in advance, Santani ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] SaneBrains 1.0.0 Released!
Stepper 1.0.0 Released! This is a framework for performing asynchronous tasks on Zope servers. It is written as a Zope Product and can be used in several different ways: - for running sequences of migration code from the console. - for running batch processes via cron - for unit testing pieces of migration code or batch processes - for sharing asynchronous code between multiple contexts such as a migration run and a plone customisation policy. It is compatible with both Windows and Unix. For more information, please see: http://www.simplistix.co.uk/software/zope/stepper cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Stepper 1.0.0 Released! ( was SaneBrains 1.0.0 Released!, d'oh!)
Chris Withers wrote: Stepper 1.0.0 Released! ...well, this bit was right at least ;-) If anyone wants to give stepper a try, I'm happy to help out! cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope 2.8.1 on Mac OS X tiger Server
Andrew Langmead escribió: On Aug 23, 2005, at 6:24 AM, Garito wrote: I try sudo /System/Library/StartupItems/Zope/Zope start but nothing happend (nor on console) but if I launch /var/zope/sistes/bin/zopectl start it works perfectly I try to comment the if and fi lines but don't work I just want to make sure I point out to you, that little of this has to do with Zope itself, and most of the audience of this list knows little or cares little about the peculiarities of the MacOSX/Darwin init environment. One piece of information that I now realize that I forgot to put in the previous message was that if you have the section if [ $ {ZOPESERVER=-NO-} = -YES- ]; then in your startup script, then you probably have to put a line in your /etc/hostconfig that says ZOPESERVER=-YES-. The bundles in /System/Library/StartupItems and / Library/StartupItems tell the machine how to start services and in what order, but the /etc/hostconfig file specifies which services are desired for a particular machine. If you want to diagnose the shell script in /Library/StartupItems/ Zope/Zope, you might want to try to run it with the bourne shell's trace option, specified by the -x parameter. sh -x /Library/StartupItems/Zope/Zope start Sorry for the inconvenience but I don't know where to ask for these kind of problems If I search on Google about these there are few responses and very vague I type your sh -x /Library/StartItems/Zope/Zope start with these response: macmini:~ garito$ sh -x /Library/StartupItems/Zope/Zope start + . /etc/rc.common ++ set -u ++ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/System/Library/CoreServices ++ export PATH ++ . /etc/hostconfig +++ AFPSERVER=-NO- +++ AUTHSERVER=-NO- +++ AUTOMOUNT=-YES- +++ CUPS=-AUTOMATIC- +++ NFSLOCKS=-AUTOMATIC- +++ NISDOMAIN=-NO- +++ TIMESYNC=-YES- +++ QTSSWEBADMIN=-NO- +++ WEBSERVER=-YES- +++ SMBSERVER=-YES- +++ SNMPSERVER=-NO- +++ SPOTLIGHT=-YES- +++ QTSSRUNSERVER=-NO- +++ TIMESERV=-NO- +++ WEBPERFCACHESERVER=-NO- +++ ARDAGENT=-YES- +++ SOFTWAREUPDATESERVER=-NO- +++ HOSTNAME=www.sistes.net +++ IPFILTER=-NO- +++ MAILMAN=-YES- +++ CRASHREPORTER=-YES- +++ ZOPESERVER=-YES- + RunService start + StartService + '[' -YES- = -YES- ']' + ConsoleMessage 'Starting Zope' you must be root to run ConsoleMessage + /var/zope/sistes/bin/zopectl start . daemon process started, pid=22593 the pid is asigned but Zope doesn't work even if I delete the ConsoleMessages Thanks!! -- Mis Cosas http://blogs.sistes.net/Garito/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] REQUEST.has_key does not find passed argument
- Original Message - From: Santani Teng [EMAIL PROTECTED] To: zope@zope.org Sent: Thursday, August 25, 2005 4:27 AM Subject: [Zope] REQUEST.has_key does not find passed argument Hello, I'm new to Zope, Python and DTML and could therefore use some help. I have a page in which I want to pass an argument to a new DTML method when clicking a link. The relevant snippet is: a href=/contact?name_id:int=dtml-var name_idContact/a So, when you click on Contact you should get a new window. The variable name_id is previously established on the page and shows up correctly when the pointer hovers over the link, i.e. the status bar at the bottom of the browser reads: http://server.website.edu/contact?name_id:int=3 However, the DTML code for the new page doesn't seem to find this value and returns a message telling me that no name was found. Because I am stuck, here is the virtual entirety of the code: dtml-if not REQUEST.has_key('name_id') No name was found. Please specify a name. dtml-else Thank you! The request has been made. /dtml-if How can I get this page to recognize the passed argument so I can call a method with it? I have seen similar threads here on this topic but was unable to find a solution from reading them. I am also baffled by the fact that in large part I'm reusing the same code that seems to work perfectly in the same format on other pages (which I didn't write). This is probably something very simple, but I would really appreciate a hand. Your code looked ok to me so I ran a quick test using two small dtml methods: dtml method 'tst': dtml-var standard_html_header br dtml-let name_id=3 a href=tst2?name_id:int=dtml-var name_idclick here/a /dtml-let br br dtml-var standard_html_footer dtml method 'tst2': dtml-var standard_html_header dtml-if not REQUEST.has_key('name_id') No name was found. Please specify a name. dtml-else Thank you! The request has been made. /dtml-if dtml-var standard_html_footer When you run tst and then click on the 'click here' link the message 'Thank you! The request has been made.' appears. Therefore your code is working as expected. The only thing I can think of is that your dtml method called 'contact' is not being invoked properly (do you have more than 1 contact method - perhaps in different folders?). Also, try removing the '/' in front of the 'contact' in the href attribute of your html link. hth Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Job vacancy - Scotland
Hi Sharedbase has a vacancy for a Zope Web App programmer in a permanent position. We are based in: Hamilton, Scotland, Uk Sharedbase is specialising in on-line communities. Skills required (or sought) are: Zope (currently using 2.7) / Python 2.3.5 UNIX (mainly Solaris, FreeBSD; and less so OS X, Debian) PostgreSQL (7.3.x) / Psycopg GIS (mapserver) A complete job spec can be found at: http://www,sharedbase.com/jobs Salary range is between 20-30k Pound Sterling depending on skills and experience. Please contact me directly ([EMAIL PROTECTED]) if you have questions or send your CV. If you lack SQL and GIS, but think you can pick this up quickly, give it at shot anyway. RECRUITERS: Please do not contact me unless you can send me a CV of a suitable candidate. I am posting here because the agencies we're working with are unable to find the right match. Cheers Marc -- Marc Burgauer Sharedbase Ltd 60 Dumfries Road Elvanfoot ML12 6TF http://www.sharedbase.com Tel: +44 (0) 870 765 5600 Fax: +44 (0) 1864 505 246 Mob: +44 (0) 7909 913 903 Company registration: SC226521 VAT registration: 789 7904 46 Registered office: 29 Brandon Street, Hamilton ML3 6DA ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Stepper
Hi Gary, Gary Poster wrote: Hey Chris. Ever on the lookout for better things to replace our code (e.g., zasync), I took a look at Stepper. It looks nice and simple (as per your company name, I suppose ;-). It's particularly nice that it looks easier to set up than zasync. Thanks! :-) I like things simple, hence the company name and tag line ;-) We primarily need zasync for frequent, user-requested async tasks fired from within a browser. From poking around in Stepper I thought maybe one could do that with a cron job kicking stepper and some other tricks, some other tricks being something in ZODB that built up a queue for a Stepper step to process... but it didn't seem that was a primary use case for you, because I still think zasync would do a better job there. Indeed, Stepper is for doing once a day type stuff. It was originally developed to run sets of migration code, but is now going to be used to do checking of Link Objects, sending reminders about expired content, packing ZODB, etc. That said, I see no reason why it couldn't be used to meet your use case... To be clear, Stepper does tasks zasync couldn't; oh? and I think it would be more appropriate for some of our zasync usages in the field, particularly once you beef up the error handling. I'm curious about this... what needs beefing up? The class design for defining jobs is certainly prettier than what I did too, though arguably both approaches have advantages. I might choose your approach for a new take on zope_exec plugin, for instance, if I did more zasync work. Hmmm, what's zope_exec? In any case, to your knowledge, am I on the right track with my analysis of what you have done? Yup, think so... Does Stepper support frequent, browser-requested async tasks, now or in your plans? Not really, that's not its focus. But, another product could easily be built to handle the put jobs in a queue thing and also supply a Stepper step. Maybe zasync could evolve to do just that and leave the actual offline task running (which is an admittedly pretty small task!) to Stepper? I would have sent this to the zope mailing list if I subscribed; feel free to cc responses there if you would like. Sure, I'll CC the zope list in for kicks :-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Random Module
Why won't Zope let me call the random module? It's really annoying to have to write an external method to call such a simple tool. Is there a way around this? Thanks. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Random Module
You can keep all the modules/types/etc you want Zope to stop hassling you about into a single file, restart Zope, and enjoy life again. create a Product called whatever you like (we called ours 'GlobalModules')... our looks like this: in Products/GlobalModules: __init__.py # Global module assertions for Python scripts from Products.PythonScripts.Utility import allow_module from AccessControl import allow_module, allow_class, allow_type allow_module('re') import re allow_type(type(re.compile(''))) allow_type(type(re.match('x','x'))) allow_module('zipfile') import zipfile allow_class(zipfile.ZipFile) allow_class(zipfile.ZipInfo) END-- For you, obviously, you'll want to allow_module('random'), perhaps declare some of its own special types, etc... hth Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sam Boggess Sent: Thursday, August 25, 2005 1:36 PM To: zope@zope.org Subject: [Zope] Random Module Why won't Zope let me call the random module? It's really annoying to have to write an external method to call such a simple tool. Is there a way around this? Thanks. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Random Module
Are you sure you can't import the functions you need? It might be worthwhile to see if what you want to do can be done without adding to your allowed modules. That should be kind of a last resort. I'm curious what kind of functionality you need from random that can't be done within the importable functions... -- David On Aug 25, 2005, at 10:36 AM, Sam Boggess wrote: Why won't Zope let me call the random module? It's really annoying to have to write an external method to call such a simple tool. Is there a way around this? Thanks. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] SQL Problem
I'm having a really annoying SQL problem which I think (or hope) can easily be sorted but I'm not sure how to do it. I have a ZPT which is collecting data in a form - Both text boxes and checkboxes. The form then passes the variables on to a DTML Method which does a few bits of error checking then calls an Z SQL Method to insert the data. If all of the data is completed (i.e. each textbox and checkbox is ticked) then the form inserts the data exactly as it should. If not all checkboxes are ticked the page returns an error - This is due to the SQL Method trying to insert data which hasnt been passed to it. Below is my SQL Method: INSERT choices (userid, datetime, course, name, core1, core2, core3, core4, core5, choice1, choice2, choice3, choice4) VALUES ( dtml-sqlvar userid type=string, dtml-sqlvar datetime type=string, dtml-sqlvar course type=string, dtml-sqlvar name type=string, dtml-sqlvar core1 type=string, dtml-sqlvar core2 type=string, dtml-sqlvar core3 type=string, dtml-sqlvar core4 type=string, dtml-sqlvar core5 type=string, dtml-sqlvar choice1 type=string optional, dtml-sqlvar choice2 type=string optional, dtml-sqlvar choice3 type=string optional, dtml-sqlvar choice4 type=string optional ) Arguments are: userid datetime course name core1 core2 core3 core4 core5 choice1 choice2 choice3 choice4 Note: Choice1-4 are checkboxes and every other item is a textbox. Please help - Its doing my head in! Cheers and all the best Phil ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] SQL Problem
Philip Beardmore wrote: I'm having a really annoying SQL problem which I think (or hope) can easily be sorted but I'm not sure how to do it. I have a ZPT which is collecting data in a form - Both text boxes and checkboxes. The form then passes the variables on to a DTML Method which does a few bits of error checking then calls an Z SQL Method to insert the data. If all of the data is completed (i.e. each textbox and checkbox is ticked) then the form inserts the data exactly as it should. If not all checkboxes are ticked the page returns an error - This is due to the SQL Method trying to insert data which hasnt been passed to it. You can provide default values to the parameters of your Z SQL Method. Alternately, I believe the DTML sqlvar tags can also be given a default behavior. --jcc -- Building Websites with Plone http://plonebook.packtpub.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] SQL Problem
Hi JCC, That is exactly what I was looking for - Assigning a default value works great! I previously tried to do this using the syntax provided by zope help: title:string=default value but had no luck. Thanks :- Phil - Original Message - From: J Cameron Cooper [EMAIL PROTECTED] Date: Thursday, August 25, 2005 10:35 pm Subject: Re: [Zope] SQL Problem Philip Beardmore wrote: I'm having a really annoying SQL problem which I think (or hope) can easily be sorted but I'm not sure how to do it. I have a ZPT which is collecting data in a form - Both text boxes and checkboxes. The form then passes the variables on to a DTML Method which does a few bits of error checking then calls an Z SQL Method to insert the data. If all of the data is completed (i.e. each textbox and checkbox is ticked) then the form inserts the data exactly as it should. If not all checkboxes are ticked the page returns an error - This is due to the SQL Method trying to insert data which hasnt been passed to it. You can provide default values to the parameters of your Z SQL Method. Alternately, I believe the DTML sqlvar tags can also be given a default behavior. --jcc -- Building Websites with Plone http://plonebook.packtpub.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] redirecting logs
I want to direct the Z2.log file to both a local file and to a remote machine. I think the configuration might be something like this: logger access level WARN logfile path $INSTANCE/log/Z2.log format %(message)s /logfile syslog address 192.168.0.92:514 format %(message)s /syslog /logger but it does not seem to function correctly. Has anyone tried this? Any assistance would be appreciated. This is Zope 2.7.6. -- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Where to authenticate during traversal
Dieter Maurer wrote: - the getObject method never tries to catch any exceptions, it just uses a simple restrictedTraverse to turn the path stored in the ZCatalog into an object Sad that the long discussion could not convince you that restrictedTraverse is not the correct approach... Sad that you didn't read some of the long discussions ;-) This was agreed to be one of two correct approaches depending on your point of view. In fact, both Zope 2.7.7 and 2.8.0 support this approach, and in 2.8.0, it is the default. There are two reasons why SaneBrains is relevant for Zope 2.8.0, one minor, one major: - the minor one is that the code in 2.8.0 supports both approaches, and so is more complex, and hence slightly slower than the one SaneBrains uses - the major one is that SaneBrains' getObject does a pure restrictedTraverse rather than 2.8.0's unrestrictedTraverse-to-parent-followed-by-restricted-traverse-to-actual-object. There are two views to how authentication should work: 1. Traversal should be unauthenticated and allowed to all and the nsecurity performed on the object at the end of the traversal. 2. Traversal should always be with an authenticated user and access control applied at each step in the chain. ZPublisher does the first, restrictedTraverse does the second. ZCatalog is left stranded in the middle and so we have the current vague simulation of what ZPublisher does. Now, people have made good arguments about why ZPublisher does 1, but I can't remember them other than remembering they were valid, but rarely applied in my case. I really wish there was an option to make ZPublisher do 2, but there isn't and I don't have the foo or the time to make it a configurable option, as it should be. However, SaneBrains does at least make 2 possible for ZCatalog searches and their results, which is as good as I can hope for for now. It turned out to be crucial in a recent Plone-based project as it highlighted ZPublisher inadvertently making certain objects anonymously accessible: Imagine documents that can have attachments. Attachments have a single-state workflow which has them always accessible with their access being controlled by the workflow state of their containing document. Sounds good, yes? Well, what we were experiencing is that documents were showing up in portal_catalog searches but then causing the results page to blow up with None has no attribute 'absolute_url' errors thanks to Zope 2.7.5's getObject implementation. After inserting SaneBrains, it turned otu to be unauthorised errors. Hmmm... we thought, why are unaccessible objects showing up in our search results when portal_catalog is supposed to filter for those kinds of things? The answer, of course, is that the attachment itself was anonymously viewable, but it was in a document that was 'private', so portal_catalog's filtering was letting it through, but the call to getObject was bombing out when it tried to traverse through the containing document. Ok.. we thought, and caught the Unauthorized errors now being raised by SaneBrains and stripped those items out of the search results. ...but wait, there's more: Thinking this through, once someone knows the URL of an attachment, and the are often emailed around with this project, they will always be able to download it, regardless of the workflow state. Eeep :-( we though, and cursed and swore a lot at ZPublisher before moving attachments to a two-state workflow: public and private, which solved both the portal_catalog-not-filtering and the ZPublisher-not-requiring-authentication problems with the attachments in question. Morals of the story: - SaneBrains is a GOOD idea, even if only for debugging purposes - ZPublisher doesn't always do what a lot of us would expect. Sadly, that's by design and won't change, even though it's not really documented in as big or bold letters as it should be. cheers, Chris :-P -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )