[Zope-dev] dtml-in: sort is not locale-aware
Hello! Currently dtml-in does not use locale when sorting the sequence. Before creating a patch I want to discuss a way dtml-in should handle this. The problem is that list.sort() does not sort according to koi8-r cyrillic locale; to make sort locale-aware I need to list.sort(locale.strcoll). But how I could ask dtml-in to use locale.strcoll? Should I add another option to dtml-in? Something like dtml-in somesequence sort=name use_locale ? Oleg.(All opinions are mine and not of my employer) Oleg Broytmann Foundation for Effective Policies [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] dtml-in: sort is not locale-aware
On Tue, 20 Jun 2000, mike wrote: But how I could ask dtml-in to use locale.strcoll? Should I add another option to dtml-in? Something like dtml-in somesequence sort=name use_locale ? I use dtml-in "ru_sort( somesequence)" A bit slower but works like hammer. I want to use all power of dtml-in and other zope tools. There are things where I can just write my functions and methods; and there are cases so general that it's more correct to extend zope functionality. Do you know that latest version of Zope can sort by multiple keys? How do you extend your ru_sort() to reflect the change? Oleg.(All opinions are mine and not of my employer) Oleg Broytmann Foundation for Effective Policies [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Catalog acquisition problems?
Hi there, We've been experiencing some odd interactions between the ZCatalog and acquisition. Inside the dtml-in catalog .. tags things seem to go screwy. It's picking up the properties in the root folder instead of in the subfolder (the context), where the dtml-in catalog .. is used. Why would this happen? Another odd thing that happens is that dtml-let variables appeared wiped empty inside the dtml-in: dtml-let foo="'bar'" dtml-in catalog .. ... dtml-var foo ... /dtml-in /dtml-let The dtml-var foo will display nothing. 'foo' *does* exist, but it just appears to be empty. Am I missing something, or is this a bug? Regards, Martijn ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] Unpickleable Error
The product isn't using cStringIO. I didn't even know it existed until now ;) I stepped through the code, and in lib/python/ZODB/Connection.py in the commit() function, when it gets to the line dump(state) on line 347 where state is (apparently) all the correct information for my object, it gets the UnpickleableError. I noticed in the Collector that bug #383 was about Unpickleable errors with SQL methods. The object that's trying to get pickled in this case contains SQL methods. Granted, bug 383 was from around this time last year, but it's the best lead I've got so far. I don't use cStringIO anywhere in my product. Well since my product *does* use the SQL class, and the SQL class uses the DA class, and the DA class uses cStringIO, I guess *technically* I am using it. We create SQL methods then store them as properties of the class. This may be what it's choking on. It shouldn't be - SQLMethods don't ever actually assign a StringIO to anything but transient variables. The Results object returned from a query could in some cases wrap a StringIO instance - you don't do anything in your product where Results objects would be stored as object attributes do you? If this were a problem common to all SQLMethod objects then I would expect people to be seeing this error all over the place. Is anyone else seeing this? If you're not storing Results anywhere, it would be helpful to see the str() of the 'state' being dumped in commit() - also to know what database adapter/version you are using... Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZPatterns alpha 3 released (was re: ZPatterns 0.4.0a2 bug fixes)
At 11:54 AM 6/20/00 +0300, Itamar Shtull-Trauring wrote: "Phillip J. Eby" wrote: * The missing _objectChanged() message - it was very hard to track down, because everything appeared to be working right, except for the fact that it wasn't working. Turns out that _v_status_ (the variable, not the method) was an empty string. Which meant that what looked like self.__dict__['_v_status_'] in code was actually self.__dict__['']. Now I'm having problems with changing objects - Error Type: KeyError Error Value: _v_status_ .. File /home/Zope2/lib/python/Products/ZPatterns/DataSkins.py, line 192, in __set_attr__ File /home/Zope2/lib/python/Products/ZPatterns/DataSkins.py, line 137, in _objectChanging KeyError: (see above) As far as I can tell _v_status_ is not initialized at any point, which is what causes the problem. Huh? Oh, %#()@%... I fixed that in my working copy, but didn't check it into CVS before building a release .tgz yesterday... Argh. Line 137 of DataSkins.py *should* read: if self._v_status_ is not ChangedStatus: Sorry, everyone. I've checked in this fix, along with the one for Mike's "missing _v_dm_" problem, and uploaded an alpha3 release. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Test request: ZSession - ZPatterns based session manager
At 08:58 PM 6/19/00 +0800, mike wrote: http://www.zope.org/Members/RainDog/ZSession/ZSession-0.0.2.tar.gz/view Comments? Now that I've had a chance to really look at this (while tracking down one of the bugs you found), I do have a few comments. First, nice job... It's a good adaptation use of ZPatterns. I do have some suggestions for fine tuning, though. * Rather than putting property manipulation functions right into the base Session class, I would simply let users derive ZClasses of their own from Session. They could then actually give the Session a UI of its own, for example. Think of someone creating a Session subclass called "Shopping Cart", with methods for viewing, checking out, adding/deleting items, etc. Or, if they have many subsystems which want to share the same Session objects, they could do this by having each subsystem use a different propertysheet of the same Session object. IMHO, the basicSheet stuff you've done, while convenient, encourages developers to take the quick-and-dirty route of just using the Session as a place to store variables - and that throws away a lot of the usefulness of ZPatterns. For one thing, you've guaranteed that Sessions have to be stored as persistent objects in the ZODB, or at least that the basicSheet has to support arbitrary properties. * Make dead session removal something that doesn't happen automatically, or at least have an option to do so. Your default deletion algorithm would be very expensive when executed against a non-ZODB database, and would be more efficiently done a few times a day in large batches by a cron job. * Delegate determining which sessions are dead to the Rack, rather than doing it in the Specialist. This allows an SQL implementation to make use of indexes. Specifically, make removeDead call: self._getSource().findIdleSessions(self.session_ttl) And then provide a default implementation of findIdleSessions() in the Specialist. (Btw, please note that your current implementation absolutely requires that at least *some* session data be stored persistently in the ZODB, which if you're using a FileStorage, is a bad place for it to be.) Now, the whole thing works the same way when first installed, but if someone implements the session ID and lastAccessed attributes in an SQL database, they can substitute a different implementation for findIdleSessions() by putting it in the Rack. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns alpha 3 released (was re: ZPatterns0.4.0a2 bug fixes)
At 10:25 PM 6/20/00 +0800, mike wrote: "Phillip J. Eby" wrote: Huh? Oh, %#()@%... I fixed that in my working copy, but didn't check it into CVS before building a release .tgz yesterday... Argh. Line 137 of DataSkins.py *should* read: if self._v_status_ is not ChangedStatus: Sorry, everyone. I've checked in this fix, along with the one for Mike's "missing _v_dm_" problem, and uploaded an alpha3 release. Thank you, Phillip. I've spent all the evening hunting these bugs. By the way, how do you debug? Is there better way than inserting things like print "objectChanging %s, has status=%d" % ( self, self.__dict__.has_key('_v_status_') ) I haven't found one yet. I'm actually using zLOG.LOG calls, however, to a logfile, so I can look back at things easily (and because I didn't realize you could use print until you posted this... :) ). ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Objet : Re: ZScheduler-0.0.5 problem
This is going to be hard to debug remotely. Can you help me out? First try getting ZScheduler 0.0.6 which fixes a problem of non-responsive Zope, though there the problem was on shut-down not on start-up. Be sure you have STUPID_LOG_FILE working. Then uncomment some of my debugging statements (calls to loggerr) in the source of __init__.py and Dispatcher.py -- maybe add some instrumentation yourself -- all with the goal of observing how far it runs before Zope hangs. Maybe you'll have to activate one of the #import pdb; pdb.set_trace() statements (in an appropriate place, of course). Also, are there any entries in the Zope log or system log that are seem relevant? The only other thing that comes to mind is that ZScheduler depends on Python's threading module, so you must have a version of threading that works on your OS. I don't know whether there are any "gotchas" with respect to Python threading on Linux (Linux 6.1, I386, Zope-2.1.7.). Maybe someone else can step in and let us know if there are. Please continue to copy [EMAIL PROTECTED] -- Thanks -- Loren - Original Message - From: "Francois-Regis CHALAOUX" [EMAIL PROTECTED] To: "Receipt Notification Requested" [EMAIL PROTECTED] Sent: June 20, 2000 06:48 AM Subject: Objet : Re: ZScheduler-0.0.5 problem Hi Loren, loren1. Zope 2.1.7 has been withdrawn due to CVS confusion. Can you reproduce the problem on another version, such as 2.1.6?. Is there any indication of why it won't start (error message)? Did you start it with -D set, so it would display errors on the console?/loren Yes, the script start script contains '-D "$@"' but nothing is displayed on the console when I try to fetch an object from zope. Zope is is blocked and that's all :( Hi, 1/ I'm Trying to use ZScheduler-0.0.5 on Linux 6.1, I386, Zope-2.1.7. Just after to install the product I cannot start Zope !!! 2/ There is also an archive problem when I extract the file from ZScheduler-0.0.5.tgz : srchocolat 138% tar xvzf ZScheduler-0-0-5.tgz lib/python/Products/ZScheduler/ lib/python/Products/ZScheduler/__init__.py lib/python/Products/ZScheduler/addOneTimeZEvent.dtml lib/python/Products/ZScheduler/README.txt lib/python/Products/ZScheduler/CHANGES.txt lib/python/Products/ZScheduler/ZSchedule.py lib/python/Products/ZScheduler/version.txt lib/python/Products/ZScheduler/ZEvent.py lib/python/Products/ZScheduler/Loggerr.py lib/python/Products/ZScheduler/Dispatcher.py lib/python/Products/ZScheduler/documentEdit.dtml lib/python/Products/ZScheduler/scheduleView.dtml lib/python/Products/ZScheduler/www/ lib/python/Products/ZScheduler/www/OneTimeZEvent.gif lib/python/Products/ZScheduler/www/RecurringZEvent.gif lib/python/Products/ZScheduler/www/ZSchedule.gif gzip: stdin: decompression OK, trailing garbage ignored tar: Le processus enfant a retourné le statut 2 tar: Statut d'erreur reporté d'erreurs précédentes. srchocolat 139% ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Test request: ZSession - ZPatterns basedsession manager
"Phillip J. Eby" wrote: At 08:58 PM 6/19/00 +0800, mike wrote: http://www.zope.org/Members/RainDog/ZSession/ZSession-0.0.2.tar.gz/view Comments? Now that I've had a chance to really look at this (while tracking down one of the bugs you found), I do have a few comments. First, nice job... It's a good adaptation use of ZPatterns. I do have Thanks. some suggestions for fine tuning, though. * Rather than putting property manipulation functions right into the base Session class, I would simply let users derive ZClasses of their own from Session. They could then actually give the Session a UI of its own, for I put those get/set/has stuff just for make easier life of some lazy people (like me :-) example. Think of someone creating a Session subclass called "Shopping Cart", with methods for viewing, checking out, adding/deleting items, etc. Or, if they have many subsystems which want to share the same Session objects, they could do this by having each subsystem use a different propertysheet of the same Session object. Well, well, well. As for me, beter I've set up a Client abstraction which have access to CartManager and store cart_id in the session object. Mixing Session and Cart is not a good idea just because Client can have several carts, for example. The composition is better than inheritance in this case, Phillip :-) IMHO, the basicSheet stuff you've done, while convenient, encourages developers to take the quick-and-dirty route of just using the Session as a place to store variables - and that throws away a lot of the usefulness of ZPatterns. For one thing, you've guaranteed that Sessions have to be stored as persistent objects in the ZODB, or at least that the basicSheet has to support arbitrary properties. But without this stuff people will have to code ZClasses each time they want sessions. Hmm... I guess the best way is splitting current session class into two - simple Session and LazySession. * Make dead session removal something that doesn't happen automatically, or at least have an option to do so. Your default deletion algorithm would be very expensive when executed against a non-ZODB database, and would be more efficiently done a few times a day in large batches by a cron job. Moreover, I found a bug which causes infinite loop :-( You're right, automatic removal should be optional. Will be fixed in 0.0.3 release. * Delegate determining which sessions are dead to the Rack, rather than doing it in the Specialist. This allows an SQL implementation to make use of indexes. Specifically, make removeDead call: self._getSource().findIdleSessions(self.session_ttl) And then provide a default implementation of findIdleSessions() in the Specialist. (Btw, please note that your current implementation absolutely requires that at least *some* session data be stored persistently in the ZODB, which if you're using a FileStorage, is a bad place for it to be.) Now, the whole thing works the same way when first installed, but if someone implements the session ID and lastAccessed attributes in an SQL database, they can substitute a different implementation for findIdleSessions() by putting it in the Rack. Agree with you completely. Thanks, Mike ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Announce: ZSession-0.0.3a
In short: 1. URL = http://www.zope.org/Members/RainDog/ZSession 2. It works. 3. I need more comments/suggestions Mike ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Test request: ZSession - ZPatterns basedsession manager
At 10:51 PM 6/20/00 +0800, mike wrote: "Phillip J. Eby" wrote: example. Think of someone creating a Session subclass called "Shopping Cart", with methods for viewing, checking out, adding/deleting items, etc. Or, if they have many subsystems which want to share the same Session objects, they could do this by having each subsystem use a different propertysheet of the same Session object. Well, well, well. As for me, beter I've set up a Client abstraction which have access to CartManager and store cart_id in the session object. Mixing Session and Cart is not a good idea just because Client can have several carts, for example. The composition is better than inheritance in this case, Phillip :-) I look at components in terms of "value add". Your SessionManager's value-add is that it lets you transparently create an instance of something which is associated with a cookie and which can be expired whenever it's idle for greater than a certain period of time. But the idea of a "Session" has no real value-add to me; it just makes it possible for a thing to be managed by the SessionManager. You could in fact do without the Session class altogether, and have SessionManager simply set the lastAccessed attribute directly. This would actually make SessionManager more useful, because you could use it with ZClasses that hadn't been explicitly designed to be session-based, as long as there was an AttributeProvider for lastAccessed. And you could drop the SessionSource class altogether as well, since any RackMountable/DataSkin would be acceptable as a "Session". Popular opinion to the contrary, I don't believe that there is such a thing as a "session" object. Session objects are a hack, to give you a place to put session-specific objects' data. In my opinion, if you can have session-specific objects, you don't really need a "session" object. If one can simply call CurrentCart() or CurrentGame() (where CurrentCart and CurrentGame are SessionManager specialists) to retrieve a session-specific shopping cart or gameboard, why have a "session" object? If I want them both to use the same cookie, I can certainly do that by setting the properties on both CurrentGame and CurrentCart. And there's also no chance that two session-specific objects from different vendors (such as perhaps my Games and Carts) will accidentally collide with each others attributes or sheets in the "session" object, since they're being handled by seperate specialists. IMHO, the basicSheet stuff you've done, while convenient, encourages developers to take the quick-and-dirty route of just using the Session as a place to store variables - and that throws away a lot of the usefulness of ZPatterns. For one thing, you've guaranteed that Sessions have to be stored as persistent objects in the ZODB, or at least that the basicSheet has to support arbitrary properties. But without this stuff people will have to code ZClasses each time they want sessions. Hmm... I guess the best way is splitting current session class into two - simple Session and LazySession. Yeah, but to my way of thinking, they *should* be coding them, because if they're not it means they haven't thought their design through enough to know what *kind* of session-specific object they're making. To me, there is no such thing as a session object, only session-specific objects. In any case, it's not a big deal to make a session-specific object. Add a ZClass, base it on DataSkin, set up a "common instance" property sheet, and boom, you're done. Now set your session manager's rack to use it, and you're in business. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns alpha 3 released (was re: ZPatterns0.4.0a2 bug fixes)
At 05:49 PM 6/20/00 +0300, Itamar Shtull-Trauring wrote: Huh? Oh, %#()@%... I fixed that in my working copy, but didn't check it into CVS before building a release .tgz yesterday... Argh. Line 137 of DataSkins.py *should* read: Great, it works! Tell me, were you able to use GenericTrigger(s) to do the cataloging? It might be more convenient to update/modify than your cataloging-specific Agent class. Also, I noticed that your getMemento routine saves the object's __dict__, but that's of absolutely no value whatsoever, since the __dict__ is a mutable object and will thus have been changed by the time you get the commit-time messages. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] SOAP?
I'm trying to find some information about using the SOAP protocol to communicate with the Zope server. Not having much luck at this point; any hints or suggestions would be appreciated. Thanks. David Wilcoxen Austin, Texas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] SOAP?
I'm trying to find some information about using the SOAP protocol to communicate with the Zope server. Not having much luck at this point; any hints or suggestions would be appreciated. Thanks. David Wilcoxen Austin, Texas Hi David, Zope doesn't yet support SOAP, though this is expected in the future. Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] censemble communication toolkit and distributed lock manager
I recently announced the availability of censemble communication toolkit and a distributed lock manager built using it. After reading about ZEO and the plans to turn the Zope Storage Service into a replicated service, I thought you might find this work useful. regards, Mark Hayden CEnsemble Version 0.03 Download: ftp://24.142.58.202/pub/hayden/ CEnsemble is a toolkit for building reliable distributed applications. It provides a library of protocols that can be used for quickly building complex distributed applications. CEnsemble is a rewrite in C of the Ensemble system, which was written in a dialect of the ML programming language. More information of Ensemble can be found at: Homepage: http://www.cs.cornell.edu/Info/Projects/Ensemble/index.html Download: ftp://cs.cornell.edu/pub/ensemble/ Included with censemble-0.03 is a complete distributed lock manager (DLM) built using the toolkit. The DLM can be used either through a text-based pipe interface or linked into your application as a C library. No familiarity with Ensemble is needed to use the DLM (all the interface is in one header file). A DLM tutorial is included (censemble/dlm/README). The DLM features include: * Fault-tolerant. Any of the lock manager processes can fail; the system will remain available as long as a quorum (majority) of the servers continue running. * Load balanced: locks are randomly assigned to servers to manage. As servers are added or removed from the system, they will reassign locks to even the load. * Reader/writer locks. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] DA for postgresql?
Hello, Can anyone tell me about the various Postgresql DA currently available? I don't know which to take between ZPoPyDA and ZPyGreSQLDA. I installed both of them, and I can't tell the difference between the two... This will be for a production server. Is PostgreSQL a good choice? Actually, I don't have the choice -- I have to use PostgreSQL. thanks for any input regards, jephte clain [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] LoginManager add trouble
Using: Zope2 (cvs) ZPatterns 0.3.0 LoginManger 0.8.6 When I try to add a LoginManager, I get the following error and traceback. Any ideas? sRp - Error Type: KeyError Error Value: _owner Traceback (innermost last): File /a4/srp/Zope2/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /a4/srp/Zope2/lib/python/ZPublisher/Publish.py, line 187, in publish File /a4/srp/Zope2/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook File /a4/srp/Zope2/lib/python/ZPublisher/Publish.py, line 171, in publish File /a4/srp/Zope2/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_addLoginManager) File /a4/srp/Zope2/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_addLoginManager) File /a4/srp/Zope2/lib/python/Products/LoginManager/LoginManager.py, line 230, in manage_addLoginManager File /a4/srp/Zope2/lib/python/OFS/ObjectManager.py, line 249, in _setObject (Object: ElementWithAttributes) File /a4/srp/Zope2/lib/python/AccessControl/Owned.py, line 267, in manage_fixupOwnershipAfterAdd (Object: SheetProviderContainer) File /a4/srp/Zope2/lib/python/AccessControl/Owned.py, line 174, in changeOwnership (Object: SheetProviderContainer) KeyError: (see above) -- Scott Parish http://srparish.net PGP signature
[Zope] ZServer+SiteAccess+Apache+SSL
I've just managed to get ZServer running behind Apache with SiteAccess (thanks for the how-to, anser!) Now, has anyone managed to configure SSL into a mix like this? Seems to me I should be able to go through the standard SSL setup for Apache, and not worry too much more abou the ZServer component of the architecture. thanks Wayne ___ 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] 2.2.0 zclass weirdness
I've created a ZClass call HomeDirContainer that inherits from ObjectManager. In that ZClass I created another ZClass called HomeDir. The idea being that HomeDirs can only exist in HomeDirContainers. So, I add an instance of HomeDirContainer, then go into it and click "Add" - which is attempting to post to the current object and pass it :method=HomeDir_factory. And I get the following error: Zope Error Zope has encountered an error while publishing this resource. Resource not found Sorry, the requested Zope resource does not exist. Check the URL and try again. Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. Traceback (innermost last): File /home/Zope-2.2.0b1-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /home/Zope-2.2.0b1-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /home/Zope-2.2.0b1-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: RoleManager) File /home/Zope-2.2.0b1-src/lib/python/ZPublisher/Publish.py, line 162, in publish File /home/Zope-2.2.0b1-src/lib/python/ZPublisher/BaseRequest.py, line 427, in traverse File /home/Zope-2.2.0b1-src/lib/python/AccessControl/User.py, line 414, in validate (Object: RoleManager) File /home/Zope-2.2.0b1-src/lib/python/ZPublisher/HTTPResponse.py, line 520, in notFoundError NotFound: (see above) Is there something new I need to do in 2.2.0 to make this work - or is this a bug? Help is greatly appreciated. ^Roman ___ 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] 2.2.0 zclass weirdness
Well, I figure this out. HomeDir_factory was getting its Use Factory permission set to (disabled). I think this was becuase HomeDirContaine didn't automatically have "Add HomeDirs" in its list. Is this a bug? ^Roman "RM" == Roman Milner [EMAIL PROTECTED] writes: RM I've created a ZClass call HomeDirContainer that inherits from RM ObjectManager. In that ZClass I created another ZClass called RM HomeDir. The idea being that HomeDirs can only exist in RM HomeDirContainers. RM So, I add an instance of HomeDirContainer, then go into it and RM click "Add" - which is attempting to post to the current RM object and pass it :method=HomeDir_factory. And I get the RM following error: ___ 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] comercial products using zope
Hi, I am researching using zope as a framework for a product that I am going develop and sell. I will develop a python product for zope. The product will not be open source, so I will only be distributing the byte code .pyc files, and not the source. However I understand that it is possible to decompyle .pyc files back to the sourcealthough I don't know how difficult this is to do successfully. Are there any tricks that I should know about to make this any harder? Basically I want to know if anyone else has used zope for a commercial product b4, and how they did it. Is there anything in particular that I should know about. Should I just rely on a good software license to protect my code? Also...are .pyc files as platform independent as .py files? Any info appreciated. terry -- 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 ___ 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] Problem with adding items to ZClass instance
I don't think there's anything "special" about my ZClass. It's derived from Catalog Aware and ObjectManager. I believe I reproduced it without the Catalog Aware and got the same results. I'm using Andy Dustman's version of the MySQLDA and TinyTable v0.8.2. They both work just fine once I get the objects in the right place. Maybe the problem just happens to be with these two products, but I have no clue. You're welcome to fetch the product at ftp://ftp.logicetc.com/pub/Zope/IssueTracker.zexp if you want to give it a look. It's a one day throw-together port of the issue tracking system used by the PHP project with modifications for my own needs. OK, I downloaded it and I think I found your problem (not wure how to remediate this, though). If you look in the source of the management screen http://localhost/somefolder/IssueTrackerInstance/manage_main, the dropdown list for adding Product looks like this: FORM ACTION="http://localhost/somefolder/IssueTrackerInstance/" METHOD="GET" SELECT NAME=":method" ONCHANGE="location.href='http://localhost/testhier/blup/'+this.options[this.selectedIndex].value" OPTION value="manage_workspace" DISABLEDAvailable Objects OPTION value="manage_addProduct/OFSP/documentAdd"DTML Document OPTION value="manage_addProduct/OFSP/methodAdd"DTML Method OPTION value="manage_addProduct/MailHost/addMailHost_form"Mail Host OPTION value="manage_addTinyTableForm"TinyTable OPTION value="manage_addProduct/OFSP/manage_addUserFolder"User Folder OPTION value="manage_addZMySQLConnectionForm"Z MySQL Database Connection /SELECT INPUT TYPE="SUBMIT" VALUE=" Add " /FORM As you see, most of the items have a manage_addProducts/ as a start. Not so with TinyTables and MySQLConnection. They call the add_TinyTableForm and manage_addZMySQLConnection form. They do not switch the namespace to manage_addProduct (not in the form). Why this is a problem, I can't tell, but this _is_ the problem. I'm not quite sure about the solution. Probably it's best to make a custom manage_main form that does the right incantations for adding products and then map this to your Contents View in the ZCLass definition. As a side I'd like to remark that all products should comply with the same manage_addProduct interface, because the current situation leads to nasty problems. Rik ___ 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] comercial products using zope
On Tue, 20 Jun 2000, Terry Kerr wrote: I am researching using zope as a framework for a product that I am going develop and sell. I will develop a python product for zope. The product will not be open source, so I will only be distributing the byte code .pyc files, and not the source. However I understand that it is possible to decompyle .pyc files back to the sourcealthough I don't know how difficult this is to do successfully. Are there any tricks Pretty easy... There are good decompilers there... that I should know about to make this any harder? I doubt. Basically I want to know if anyone else has used zope for a commercial product b4, and how they did it. Is there anything in particular that I should know about. Should I just rely on a good software license to I think good license, good support and good price would serve you much better than any tricks. protect my code? Also...are .pyc files as platform independent as .py files? Currently yes, but I'd recommend not to rely on this - may change in the future. Oleg.(All opinions are mine and not of my employer) Oleg Broytmann Foundation for Effective Policies [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] comercial products using zope
Terry Kerr wrote Basically I want to know if anyone else has used zope for a commercial product b4, and how they did it. Is there anything in particular that I should know about. Should I just rely on a good software license to protect my code? Also...are .pyc files as platform independent as .py files? Yes. Digital Creations, and the product was called Principia. I don't know if all the stuff with the mangled and encrypted byte code support is still there, tho. Anthony ___ 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] scared
when things happen that I have no understanding of their cause I get a little scared. I started up zope this morning, it seemed to open normally. (I am running zserver and zope on a win98 machine) However when I went to access the site through the web, the server would shut down. I have recently exported the app. that I was working on, which makes me happy but I need to get it back up and working asap. What information do I need to get the bottom of this? I don't know how to copy and paste from a dos window, so I will transcribe what I can see, hopefully someone can tell me where I might look next! (I have taken out all the directory structure from the filenames) File "...\ZServer\medusa\asyncore.py", line 321, in handle_error self.close() File "..\ZServer\HTTPServer.py", line 356, in close p.more() #free up resources held by producer File "..\ZServer\Producers.py", line 108, in more getattr(self.logger, self.method)(self.bytes) File "..\ZServer\medusa\http_server.py", line 275, in log, _ _ [%s] "%s" %d "%s" "%s"\n' % ( LOG STUFF ) ... IOError: [Errno 9] Bad file descriptor Oh I feel rotten, way out of my depth! I just want zope to work!!! Not really sure where to start, will reinstalling the whole thing write over my data? I guess I have it backed up, but still... thanks for ANY help!! josh on ___ 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] scared
Would it be a bad idea to just install another copy of zope in a different directory? Would that clash somehow? josh ___ 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] scared
josh on wrote: Would it be a bad idea to just install another copy of zope in a different directory? Would that clash somehow? Maybe, but not in any bad way, the worst I can see happenign is that they try and get the same ports on your machine. Just run up one instance at a tiem to make sure that doesn't happen (it shouldn't anyway, but it never hurts to be paranoid) You could also try copying the data.fs from the old install over the one in the new install if you want to get your old data back, no reason why it shouldn't work. As for your error, it looks like something bad happened when zope tried to write to the log file. Did you do any funny configuration fro your logging? What version of Zope are you using? 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] scared
Thanks Chris, As for your error, it looks like something bad happened when zope tried to write to the log file. Did you do any funny configuration fro your logging? What version of Zope are you using? I haven't changed anything to my knowledge. It did stop working after a crash though. Perhaps something is corrupted, I got a friend to test my site. He kept rightclicking and choosing "back", as quickly as he could and then it crashed... I think the page it crashed on had some .js in it... erk, I am using "Notes on Zope 2.0" oh gee I thought I was using 1.6! What version would you recommend installing? Thanks, josh ___ 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: First public release of ZEO
ZEO 0.2, an alpha version of ZEO, is now publicly available from the "ZEO page", http://www.zope.org/Products/ZEO/. ZEO is the clustering code for Zope. This version does *not* contain the multiplexing code that was holding up the release. Be sure to check the page for performance numbers posted by Greg Ward. Enjoy! --Paul ___ 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] Expressing expressions
Hi RC, RC Compaan wrote: Simple addition seems a bit tricky in zope dtml-var expr="counter=counter+value" --// Here i tried to Try dtml-call "REQUEST.set('counter',counter+value)" HTH Tino Wildenhain ___ 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] Basic site management using zope and other queries
On Tue, 20 Jun 2000, Rajil Saraswat wrote: hi , i had sent this message. may be some of you had overlooked it,so here it is again. please answer to this, as it is very important for me to switch to zope. 1. Can zope do basic site management. for example missing link checks. say if we call an object which doesnt exist. can zope show us where we have gone wrong.(without actually checking each and every object manually) 2. I have large number of small html documents(17,000). I want them to go in a database. can we automate this in zope to be uploaded it in the database. 3. Say, i want to use a zope enable webiste on a non zope enabld server, so i need all the objects(e.g. html files) from the database to come out as files. can we do this(sort of Zope to non zope convertion) 4. Which file do i need to upload to the isp end from the programmer end ,to make the site work. If we have to upload a single database it will take a lot of time. is there any incremental upload facility available. i have only ftp access with my ISP. 5. i need to build a directory like site somewhat like yahoo!, is there any toolkit available for it in zope. 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] scared
I have reinstalled zope and zodb, and copied the data.fs across. It was about two days old. All the changes that I had made were gone. Luckily I made a backup of my app yesterday by exporting it. I must have a bad understanding of how this works. I had imagined that everytime I hit CHANGE, that the data.fs file would have been updated. When the computer crashed where were all my current changes? Is there a temp file I might be able to recover, as I am still missing quite a few hours work! The lesson that I have learnt is to back up regularly by exporting. Is this the right conclusion? Thanks, josh on ___ 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] scared
- Original Message - From: josh on [EMAIL PROTECTED] I have reinstalled zope and zodb, and copied the data.fs across. It was about two days old. All the changes that I had made were gone. Luckily I made a backup of my app yesterday by exporting it. I must have a bad understanding of how this works. I had imagined that everytime I hit CHANGE, that the data.fs file would have been updated. That is how it is supposed to work, yes. If the data really isn't in your Data.fs (as opposed to being there, but inaccessible somehow) then that's a serious Zope bug. This may sound stupid, but have you tried using a different browser or aggressively clearing the cache on your current browser? Sometimes a browser has handed me a days-old folder contents view from its cache, but refreshing fixes it. When the computer crashed where were all my current changes? Is there a temp file I might be able to recover, as I am still missing quite a few hours work! You should take another copy of your original Data.fs and run Tranalyzer on it (http://www.zope.org/Members/tsarna/Tranalyzer) for clues as to what's really in it. If it shows no transactions more recent than the two-days old ones, let us know. The lesson that I have learnt is to back up regularly by exporting. Is this the right conclusion? Backups are never a bad idea. You shouldn't have to export, though; copying Data.fs, even while the system is running, should give you a good backup. 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: LocalFS cross platform bug
Jonothan Farr writes: That's a good point. Although, your patch actually does the backslash replacement regardless of whether the drive specification is present. How about this: +drive,rest=os.path.splitdrive(path) +if drive: +path = string.replace(rest, '\\', '/') I like this better than mine, thanks! This will only work if win32 paths are always specified as full paths by the browser. Do you know if this is the case? It seems to be, but I've only done limited testing. ___ 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] ProxyPass
Is there anyway to get around the fact that the remote ip is the server's ip if you use Apache's ProxyPass directive to pass requests on to Zope? Roché ___ 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: LocalFS w/ annotation data
Jonothan Farr writes: That sounds like a mess. LocalDirectory objects are not persistent, they are created each time they are requested. So you'll have nowhere to put your PersistentMappings except in the top-level LocalFS object. Trying to make the LocalDirectories persistent would be painful. For one, it would be hard to keep in synch with the file system. You could store everything in a PM at the top and use paths relative to the base but that would make copy,rename,etc. also messy, like you said. I was planning to put the only top level PersistentMapping in the LocalFS object, all the others would be values in it. Still, you're right, it's not pretty. What about just storing your meta-data in files in the local file system? Then you wouldn't need to modify the LocalFS product at all. Just write a ZClass that can read/write you meta-data file format. Might well be a better approach. I'll think about it. Unfortunately, it doesn't remove the need for automatically handling move, copy and rename, since these files wouldn't be visible to the normal archive users. ___ 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] DCOracle on AIX
Hi guys, I know this isn't Zope related but this list is the closest thing I know of. We are attempting to get DCOracle 1.3.0 working on our IBM AIX 4.2 platform talking to Oracle 8.1.5 and we are running into a problem. We can get things to compile into the shared object extension fine but it abruptly fails when we attempt a Connect() call. No exception, no core dump, just exits. Questions: 1) Is the code known to work on AIX/Oracle8 ? 2) If so can you give us some pointers or names of folks who have it working? 3) If not can you provide some things to try to help us track down the root cause? TIAAny help would be appreciated. Robin Friedrich Flight Operations Reinvent United Space Alliance ___ 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] scared
If I were running any remotely critical application on WIN98 I would be scared too. Because of legacy data issues we run Zope on NT and that just makes me nervous. Jim Sanford - Original Message - From: josh on [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 20, 2000 5:38 AM Subject: [Zope] scared when things happen that I have no understanding of their cause I get a little scared. I started up zope this morning, it seemed to open normally. (I am running zserver and zope on a win98 machine) However when I went to access the site through the web, the server would shut down. I have recently exported the app. that I was working on, which makes me happy but I need to get it back up and working asap. What information do I need to get the bottom of this? I don't know how to copy and paste from a dos window, so I will transcribe what I can see, hopefully someone can tell me where I might look next! (I have taken out all the directory structure from the filenames) File "...\ZServer\medusa\asyncore.py", line 321, in handle_error self.close() File "..\ZServer\HTTPServer.py", line 356, in close p.more() #free up resources held by producer File "..\ZServer\Producers.py", line 108, in more getattr(self.logger, self.method)(self.bytes) File "..\ZServer\medusa\http_server.py", line 275, in log, _ _ [%s] "%s" %d "%s" "%s"\n' % ( LOG STUFF ) ... IOError: [Errno 9] Bad file descriptor Oh I feel rotten, way out of my depth! I just want zope to work!!! Not really sure where to start, will reinstalling the whole thing write over my data? I guess I have it backed up, but still... thanks for ANY help!! josh on ___ 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: LocalFS w/ annotation data
I would suggest putting an extra text box on the upload form for the filename in ZOPE. You could include javascript to automatically fill in the text box whenever the ZOPE name in the file box changed. The javaScript code could use the C:\ or D:\ or whatever pattern at the beginning to determine that it might be a windows file and strip off the path. On the unlikely occassions it "guesses" wrong the user could change the name before uploading. Jim Sanford - Original Message - From: Dan L. Pierson [EMAIL PROTECTED] To: Jonothan Farr [EMAIL PROTECTED] Cc: Dan L. Pierson [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 20, 2000 7:51 AM Subject: [Zope] Re: LocalFS w/ annotation data Jonothan Farr writes: That sounds like a mess. LocalDirectory objects are not persistent, they are created each time they are requested. So you'll have nowhere to put your PersistentMappings except in the top-level LocalFS object. Trying to make the LocalDirectories persistent would be painful. For one, it would be hard to keep in synch with the file system. You could store everything in a PM at the top and use paths relative to the base but that would make copy,rename,etc. also messy, like you said. I was planning to put the only top level PersistentMapping in the LocalFS object, all the others would be values in it. Still, you're right, it's not pretty. What about just storing your meta-data in files in the local file system? Then you wouldn't need to modify the LocalFS product at all. Just write a ZClass that can read/write you meta-data file format. Might well be a better approach. I'll think about it. Unfortunately, it doesn't remove the need for automatically handling move, copy and rename, since these files wouldn't be visible to the normal archive users. ___ 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] PoPy Licence
Dear PoPy and zpopyda users, there has been a lot of discussion lately concerning the GPL issue of PoPy on zope mailing list, python mailing list and even in the Mixadlive itself. We have been thinking a lot since there. On one hand, we are very concerned about using and developing free software available for the community, on the other hand, we want to provide the best product for our user and give them the availability to enjoy popy as much as we do without having licence issue, that's free software... We have developed PoPy to work faster and cleaner and since we are using it, our work get easier than ever. That's why we have chosen to modify licences of PoPy and zpopyda and put them under the LGPL licence. We hope you'll enjoy that for comments and questions please use our mailing list : [EMAIL PROTECTED] Regards the PoPy team ___ 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] Internationalization 2nd post
How are my fellow Zopers handling Internationalization, especially text. We have a site that is composed of several hunderd pages. We don't use classes but we have made heavy use of aquistion though. For example we have one back button that is aquired thoughout the site etc etc. Basically if the functionality (or code) is used in more than one place it has been but into a method and aquired. Any thoughts or hints? thanks, DR ___ 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] TAG for file date
Greeting, Thanks Tino for your reply, but alas I am still not able to achieve what I want. Perhaps I do not understand what you are teaching. I am trying to display the date of a document in an HTML document. Here is what I tried. Step 1.) CREATE A FILE OBJECT I used the menu to create a file object. ID=GuideFile Content Type = Application/ Precondition = BLANK Step 2.) ADD CODE TO HTML FILE I tried to add dtml-var "GuideFile.bobobase_modification_time" But I do not get an output displayed!!! I tried to make it a paragraph, bold etc, but no luck. Although I do not get an error from Zope it does not work correctly. I am using the latest version of Zope 2.1.6. If you see where I failed, please let me know. Thank you in advance for any information. :-) [EMAIL PROTECTED] 06/20/00 02:52AM CURTIS David wrote: Greetings, I have a database file that gets copied via a cron job at night. I would to display the new the new file date in an htlm document using Zope. What I would like is a tag that displays the date of a specific file. Is there such a dynamic tag? I am thinking something like File-tagcopied-file/File-tag Any help would be apprechiated. actually it is dtml-var "fileobject.bobobase_modification_time" where fileobject is your actual object. HTH Tino Wildenhain ___ 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] Embedding authentication in a Zope Website
Chris, Thanks for the speedy reply. I appreciate it. The questions I have now is how do you: 1) give users the opportunity to log in... where do you actually do authentication? is there a url they must point to? should I be calling any python functions, or perhaps writing my own dtml methods to aquire their credentials? You protect an object using permissions and roles. Once they hit an object that requires authentication, they'll be prompted to log in. For example, you might want to create a role named 'Bleah' and assign a bunch of users to that role. Then protect a folder 'Foo' by assigning the 'View' permission to the 'Bleah' role. When users navigate to 'Foo', they'll be prompted for a login. If they have the 'Bleah' role, and they enter the proper username/password combo, they'll be permitted access. If they don't have the 'Bleah' role, or if they do not enter a proper username/password combo, they'll be denied access. You may also want to check out the new Zope 2.2 release that has context-sensitive help for most of this stuff via the 'Help' button on the page. 2) how can you seperate your userlists for your web sites from your user list for zope administration, especially considering you will probably want users to be able to access multiple trees equally? You don't, a user with management privileges (e.g. the "Manager" role) is just another user.. it's just that he/she has mangement privileges while others may not. Any advice appreciated. In the meantime, I am looking through as many FAQs and HowTos as I can find at the main site. The help system is good here too. Knight, The primary way of obtaining the credentials of the currently logged in user is through the AUTHENTICATED_USER attribute of the REQUEST object, ala: dtml-unless "REQUEST.AUTHENTICATED_USER.getName() == 'Anonymous' Important stuff /dtml-unless Unimportant stuff. You probably don't want to hardcode too much of this stuff into DTML, this is what permissions assigned to objects and roles assigned to users are for. Read the content manager's guide for more information on permissions and roles. The subject is a big one. I'e never used MySQLuserfolder, so I can't give you much info on that in particular. I assume it operates much like the "basic" user folder that comes 'preinstalled' in the Zope root folder, in which case you'll need to read up on AUTHENTICATED_USER. Searching the Zope.org site for "AUTHENTICATED" should turn up a bunch of hits (although AUTHENTICATED_USER will probably not because of limitations in our cataloging engine). The How-tos that you'll find through this search are probably good for this sort of thing as well. knight wrote: Greetings, Please bear with me, I'm still slightly new to Zope, but I'm pretty up on the structure, miscellaneous administration, etc. I'm also beginning to do well with Python development. I wanted to start adding authentication to my site via HTML forms, and I saw mysqlUserFolder. There aren't any real docs that come with it. More or less, a README that explains the feature set of the Product is all that it has. Installing mysqlUserFolder wasn't the problem. The problem is now dynamically outputting content based upon login information. How do I manipulate who is logged in? How do I check to see if a user is logged in, etc? Do I need to read some plain zope authentication docs? If so, please point me in the right direction. What do I embed in my DTML in order to check for authentication? I really appreciate the help... The Zope documentation is still a little out of order, and slightly confusing to navigate. Knight ___ 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] Basic site management using zope and other queries
1. Can zope do basic site management. for example missing link checks. say if we call an object which doesnt exist. can zope show us where we have gone wrong.(without actually checking each and every object manually) No. 2. I have large number of small html documents(17,000). I want them to go in a database. can we automate this in zope to be uploaded it in the database. Yep. Search the mail archives for loadsite.py 3. Say, i want to use a zope enable webiste on a non zope enabld server, so i need all the objects(e.g. html files) from the database to come out as files. can we do this(sort of Zope to non zope convertion) If this is what you want, use Jonothan Farr's LocalFS product. 4. Which file do i need to upload to the isp end from the programmer end ,to make the site work. If we have to upload a single database it will take a lot of time. is there any incremental upload facility available. i have only ftp access with my ISP. I'm not sure what you mean. 5. i need to build a directory like site somewhat like yahoo!, is there any toolkit available for it in zope. I'm not sure. Check the Download section of Zope.org and click on Products. ___ 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] comercial products using zope
On Tue, Jun 20, 2000 at 07:00:40PM +1000, Terry Kerr wrote: Basically I want to know if anyone else has used zope for a commercial product b4, and how they did it. Is there anything in particular that I should know about. Should I just rely on a good software license to protect my code? Also...are .pyc files as platform independent as .py files? I personally know of one company that sells a commercial product that is (almost) fully written in Python: GRiNS, by Oratrix (http://www.oratrix.com). They protect their product with a license and a license key. They do package the product as one binary, I believe there are some standard tools for this, you could try and start searching on python.org. But I don't think the compiled code has been obfuscated in any way or anything. For your Product to work with Zope you will have to deliver your Product in a format that the python interpreter can access, so that Zope can import your module. .pyc files are such a format, and they are as cross-platform as .py files. -- Martijn Pieters | Software Engineermailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server - ___ 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] Change Notification
Is there a way for an object to be notified that it has been modified? In particular, I want to create Relation objects that relate two arbitrary Folders. Creating the Relation object with a ZClass is easy (even for a newbie like me :-) ), but I need to update the relation links if the destination folder is moved. My thinking is that I need a parentChanged method that is invoked by a parent. parentChanged would then recursively invoke parentChanged for each of its child folders. The purpose of parentChanged would be to look for any relation objects that referenced the old location and either 1) change the reference to the new location if the old location is no longer valid (i.e. a Cut/Paste operation), or 2) add the new location if the old location is still valid (i.e. a Copy/Paste operation). This sounds expensive, and I'm not sure how to kick off the process. Does a "Paste" create a new instance? Thanks for the help, Bob Barter ___ 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] Pointers in zope ??? object1 -- object2
Title: Pointers in zope ??? object1 -- object2 Hello, I am trying to figure out how I can find a way to implement pointers in Zope. In other words, I would like to be able that the content of an attribute reference another object. object1 -- object2 and say for instance: object1.aaa := object2 and then get this object with object1.aaa I have spent a lot of time, looking for instance how the name space work. I had thought for instance that I would create a string field in which I would store the id of the other object. But the problem, is that I do know how to get the object from this id in the system, unless it belongs to the same namespace. I had also thought that I could store in this field, the url of the object. From this url, I would then be able to get the object. (since you can call an kind of method by url-of-the-object/mymethod) But it didn't work. For instance dtml-with url-of-the-object /dtml-with raise an error. eventually, you can imagine that you can access an object specified in a absulute way by using plenty of dtml-with. for instance for accessing the /root/b/c/d/e object, we would use dtml-with root dtml-with b dtml-with c dtml-with d dtml-with e /dtml-with /dtml-with /dtml-with /dtml-with /dtml-with But really this is too complicate, and really can not be implemented. Do you know an answer to this question. I can not believe that this is not possible, given the OO approach of zope, and the fact that it relies on python. Thanks, Thierry Nabeth Research Fellow INSEAD CALT (the Centre for Advanced Learning Technologies) http://www.insead.fr/CALT/
Re: [Zope] Pointers in zope ??? object1 -- object2
On Tue, 20 Jun 2000, NABETH Thierry wrote: I had also thought that I could store in this field, the url of the object. From this url, I would then be able to get the object. (since you can call an kind of method by url-of-the-object/mymethod) But it didn't work. For instance dtml-with url-of-the-object /dtml-with raise an error. There's a method on REQUEST that takes an absolute URL and gives you back the object. Check the ZQR. --RDM ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Internationalization 2nd post
On Tue, 20 Jun 2000, Dan Rusch wrote: How are my fellow Zopers handling Internationalization, especially text. Check out the list of mailing lists in the resources section of zope.org. You'll find a mailing list for ZIP, the Zope Internationalization Project, complete with archives. --RDM ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] dtml-sendmail tag that worked in 2.1.6 appears broken in 2.1.7
Hello, I have a site that contains the following tag: dtml-sendmail smtphost="localhost" mailto="zope" mailfrom="[EMAIL PROTECTED]" subject="SITE.COM EMAIL" ... /dtml-sendmail This worked fine when my server was running Zope 2.1.6. After upgrading to 2.1.7, I get the following error: Error Type: TypeError Error Value: unexpected keyword argument: localHost I've made an attempt to revert to 2.1.6 to resolve this problem. However, I noticed that I was unable to successfully pack the database after moving all the data files from the 2.1.7 tree to the 2.1.6 tree. Has anyone seen/resolved this problem? Any help is greatly appreciated. -Mark ___ 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: LocalFS cross platform bug
How about this: +drive,rest=os.path.splitdrive(path) +if drive: +path = string.replace(rest, '\\', '/') Oops, looks like this doesn't work after all. The Linux version of splitdrive doesn't actually do the split :-(. Doh! Looks like we'll need to roll our own splitdrive then. --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 ___ 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: LocalFS w/ annotation data
What about just storing your meta-data in files in the local file system? Then you wouldn't need to modify the LocalFS product at all. Just write a ZClass that can read/write you meta-data file format. Might well be a better approach. I'll think about it. Unfortunately, it doesn't remove the need for automatically handling move, copy and rename, since these files wouldn't be visible to the normal archive users. Good point. Well, for my next trick I plan to add support for generic object meta-data in the file system. If you need it right away I'd say go for it, because I don't know when I'll get to it. I'd like it if you could let me know what you come up with, though. That'll probably make things easier when I get around to implementing a general solution, which will eliminate the maintenance chore for you of keeping your branch synched up with mine. --jfarr ___ 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] Internationalization 2nd post
How are my fellow Zopers handling Internationalization, especially text. We have a site that is composed of several hunderd pages. We don't use classes but we have made heavy use of aquistion though. For example we have one back button that is aquired thoughout the site etc etc. Basically if the functionality (or code) is used in more than one place it has been but into a method and aquired. Any thoughts or hints? You could use a number of different 'language specific' folders and make your site acquire from them. There is a caveat, however, because you have to be careful to use acquisition in this way. There is a bit of information in my Changing Contexts in Zope 2 http://www.zope.org/members/Hoekstra/ChangingContexts1 hth Rik ___ 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] scared
I have reinstalled zope and zodb, and copied the data.fs across. It was about two days old. All the changes that I had made were gone. Luckily I made a backup of my app yesterday by exporting it. I must have a bad understanding of how this works. I had imagined that everytime I hit CHANGE, that the data.fs file would have been updated. It should When the computer crashed where were all my current changes? Is there a temp file I might be able to recover, as I am still missing quite a few hours work! THis never happened to me before, but it did yesterday (zope 2.1.4 on Win95) ! This seems like a bug. As for your error: I have had to throw away a corrupted (read: one that couldn't be opened) logfile before on NT. It made it possible to restart Zope again. I have wondered what strange corruptions could happen to a logfile, but apparently this may happen at times (especially if the logfile is getting big) hth Rik ___ 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] Creating a ZClass within a folder
Hi all, I am trying to create a zclass instance within a newly added folder. Here is the sequence of events 1. get name from a form, vendor 2. add a folder with id of vendor 3. within the new folder create a CouponProduct The following add method (snipped) puts the zclass instance at the same level as the new folder and not inside of it. Note: merchants is a folder containing all of the vendor folders. The add method is at the same level as the merchant folder. dtml-with merchants dtml-call "merchants.manage_addFolder(vendor,'',1)" dtml-with "vendor" dtml-with "manage_addProduct['CouponProduct']" dtml-call "REQUEST.set('id',`ZopeTime().timeTime()`)" dtml-call "CouponProductZClass_add(_.None, _, noRedirect=1)" /dtml-with manage_addProduct-- /dtml-with vendor /dtml-with merchants Peacefully, Aaron ___ 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] Select Box Problem
I have a form that pulls back previous order information from a customer. This form has a select box for with a list of customers in the database so that a user can easily select who made the order. Everything in this form works fine except for the select box. The select box shows the option at the top of the list everytime. This is not what I am looking for however, I need the select box to reflect what the customer that placed the order. I could easily do this with the select except for the fact that the select information is dynamically filled by a query. The following code is used. select name="customerid"dtml-in custcompanysearchoption value=dtml-var customeriddtml-var firstname dtml-var lastname/dtml-in/select The entire form is in a dtml-in that has a customerid value. I would like to have the current customer show up in this box. How would I tell the select box to select the current custoemer as default? Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Does dtml-sendmail work with 2.1.7?
Just thought I'd rephrase the question after doing more troubleshooting. Does anyone have this tag working for them when using Zope 2.1.6??? Thanks again. -Mark -Original Message- From: Shaw, Mark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 20, 2000 2:39 PM To: [EMAIL PROTECTED] Subject:[Zope] dtml-sendmail tag that worked in 2.1.6 appears broken in 2.1.7 Hello, I have a site that contains the following tag: dtml-sendmail smtphost="localhost" mailto="zope" mailfrom="[EMAIL PROTECTED]" subject="SITE.COM EMAIL" ... /dtml-sendmail This worked fine when my server was running Zope 2.1.6. After upgrading to 2.1.7, I get the following error: Error Type: TypeError Error Value: unexpected keyword argument: localHost I've made an attempt to revert to 2.1.6 to resolve this problem. However, I noticed that I was unable to successfully pack the database after moving all the data files from the 2.1.7 tree to the 2.1.6 tree. Has anyone seen/resolved this problem? Any help is greatly appreciated. -Mark ___ 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] dtml-sendmail tag that worked in 2.1.6 appears broken in 2.1.7
The error is saying that Zope is seeing localHost (CAPITAL H) where your snippet of code reads localhost (small h). Does your actual code have a typo? Jim - Original Message - From: Shaw, Mark [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 20, 2000 1:39 PM Subject: [Zope] dtml-sendmail tag that worked in 2.1.6 appears broken in 2.1.7 Hello, I have a site that contains the following tag: dtml-sendmail smtphost="localhost" mailto="zope" mailfrom="[EMAIL PROTECTED]" subject="SITE.COM EMAIL" ... /dtml-sendmail This worked fine when my server was running Zope 2.1.6. After upgrading to 2.1.7, I get the following error: Error Type: TypeError Error Value: unexpected keyword argument: localHost I've made an attempt to revert to 2.1.6 to resolve this problem. However, I noticed that I was unable to successfully pack the database after moving all the data files from the 2.1.7 tree to the 2.1.6 tree. Has anyone seen/resolved this problem? Any help is greatly appreciated. -Mark ___ 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] How can I upload files to mySQL
I am using Zope and mySQL and want to load up text and Images to text or = blob fields. How can I upload file content to TEXT (plain text)=20 and BLOB (images: jpg, gif) using DTML? I can answer only part of your question. Uploaded files are "ZPublisher.FileUpload" objects which you can find in the REQUEST object under the form field name. They have a "read" method returning the content as a string. Placing the string into a text field should be straight forward (same way you did it up to now). I do not know, how MySQL wants to receive BLOB values, though. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Internationalization
Dan Rusch writes: We have a site that is composed of several hunderd pages. We don't use classes but we have made heavy use of aquistion though. For example we have one back button that is aquired thoughout the site etc etc. Basically if the functionality (or code) is used in more than one place it has been but into a method and aquired. Aquisition should play well with internationalization. You would put the localization into the aquired objects. If the language information is e.g. in a cookie, you could use its value to select the various language variants of your object. If the language information is in the URL, I probably would extend the Zope folder class to a LangFolder. It would behave exactly likes a normal folder, but would add an "LANGUAGE" variable to the REQUEST object during traversal. To select the correct localization of an object, you could have language folders for each language containing the localizations for the respective language. If we assume, that all the id's are unique, DTML code similar to this can be used for selection: dtml-with "_[LANGUAGE]" dtml-var "_[id]" /dtml-with Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] TAG for file date
CURTIS David writes: I have a database file that gets copied via a cron job at night. I would to display the new the new file date in an htlm document using Zope. What I would like is a tag that displays the date of a specific file. Is there such a dynamic tag? I am thinking something like File-tagcopied-file/File-tag Any help would be apprechiated. You probably will need an external method -- at least, if you speak about a file in the file system and not an object in the ZODB. The Python module "os" contains the function "stat" that allows you to access the modification time. You may want to have a look at the Python module "time" or the Zope module "DateTime.DateTime" for ways to format the time you got with "stat". Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] brain hurts regarding dynamic fcn args in Python
Jeff Sasmor writes: Is there a (straightforward?) way to dynamically compose function argument lists? For example, in C, you can write" f(arg1, arg2, (conditional expression)?(val for TRUE state):(val for FALSE state)). Others have pointed out, that you can use "and" and "or" to emulate "? ... : ...". Be careful, there are dangers, because the emulation is not faithful. In my case here in Zope, sometimes I have to search a ZCatalog prior to displaying the results in a dtml-in looping construct. dtml-in "Catalog.searchResults(meta_type='EventDoc',event_date=[first,last],event_date_usage='range:min:max',sort_on='event_date ')" /dtml-in Now if the 'moderated' property is active I want to add the keyword arg reviewed='on' to the arg list at the time that the searchResults method is invoked. In some cases, you could use: ...(..., reviewed= moderated and 'on', ...) This will define "reviewed". It will have a Python "false" value if moderated is "false", otherwise the value 'on'. If your function uses code like: "if kw.has_key('reviewed') and kw['reviewed': ..." this will work. If the second and term is missing, if won't. I do not know, what code ZCatalog uses. Try it out or look into the source. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] sifting through python sub-objects
ed colmar writes: I've succesfully gotten the catalog to work (thanks everyone!), but in doing so, I've created a problem. Squishdot uses this code like this in order to add an item: id=self.createId()# make a datestamp id msg=PromoterPost(id,title) msg=msg.__of__(self) # ??? self.setItem(id,msg) # set the item This code is incompatible with the catalog. As far as I can tell because The catalog likes to see id's as strings, As far as I know the sources, ZCatalog expects its fields to be either simple objects (strings, numbers, dates, ...) or be callable with the result a simple object. but I don't think the object gets completely added to the zope fs either. What does that mean? After changing the code that does the adding to the zope fs everything related to the catalog seems good. Here's the new code: ob=PromoterPost(id,title) ob.id = id ob.title = title self._setObject(id,ob) self.getCatalog().catalog_object(ob,id) I would expect that "_setObject" stores the association "id - ob" somewhere. I assume, a Python dictionary is used for this purpose. Squishdot probably uses a BTree instead, because is can handle a big number of content objects more efficiently than a Python dict. So here's the problem, the methods that squishdot uses to locate sub-objects relies on a BTree() type method, called "data", and is used by a few methods like this: def objectValues(self): """ return list of subobjects """ return map(lambda x, p=self: x.__of__(p), self.data.map(self.ids)) or def is_local_user(self, thisuser): """ returns true with ID if user is a local user based on rev_id_list in squishdot """ rlist = map(None,self.ids) rlist = filter(lambda x,p=self : p.data[x].validated, rlist) rlist = filter(lambda x,p=self : p.data[x].meta_type == 'SRPersonPost', rlist) rlist = filter(lambda x,p=self,s=thisuser : p.data[x].title == s, rlist) return rlist Neither return any results, becuase in the new code, the data object is not getting updated. Do I need to keep a record of all the ids like squishdot does, or can I leave that up to zope? Use the BTree, if you want to use major parts of Squishdot. Otherwise, you must use methods from the same place you have taken "_setObject" from. I am sure, the class will have "objectValues" and "objectIds", too. And I expect, there will be some form of "_getObject" (probably named differently) to access the object corresponding to an "id". Have a look at the Object Reference in the Zope documentation. Dieter It seems like there should be an easier way than "self.data" to do this... Any ideas? ___ 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] Basic site management using zope and other queries
Rajil Saraswat writes: On Tue, 20 Jun 2000, Rajil Saraswat wrote: i had sent this message. may be some of you had overlooked it,so here it is again. please answer to this, as it is very important for me to switch to zope. You seem not to be patient ;-) 1. Can zope do basic site management. for example missing link checks. say if we call an object which doesnt exist. can zope show us where we have gone wrong.(without actually checking each and every object manually) There is a tool called "wget", which is not related to Zope. It allows to recursively visit (and download) any WWW hierarchy. Called with normal arguments, it will have problems with Zope folders ("missing trailing / in the URL"). However, about a month ago, someone posted an argument that should work with Zope. I, myself, did not yet work with "wget" and cannot help you more. Look into the archives. 2. I have large number of small html documents(17,000). I want them to go in a database. can we automate this in zope to be uploaded it in the database. I assume, you think of the Zope database ZODB. If not, put it into the database by any means that the database provides. You can use the product "LoadSite" to put lots of files into ZODB with a single call. 3. Say, i want to use a zope enable webiste on a non zope enabld server, so i need all the objects(e.g. html files) from the database to come out as files. can we do this(sort of Zope to non zope convertion) You want to look at "wget" (see above). You will loose all dynamic features, such as e.g. database access (now I speak about relational databases not the ZODB). 4. Which file do i need to upload to the isp end from the programmer end ,to make the site work. If we have to upload a single database it will take a lot of time. is there any incremental upload facility available. i have only ftp access with my ISP. This question is not clear. When you want to use Zope at the ISP, it must be installed there. If it is installed there, you can use "LoadSite" or (maybe) FTP (if ZServer with FTP is running) to load your pages into Zope. 5. i need to build a directory like site somewhat like yahoo!, is there any toolkit available for it in zope. Have a look at "ZTopic". Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Need to use a 'date' data type in sqltest
Jones, David H writes: I need to include a test of a date in a DTML variable referenced in a sqltest tag in ZSQL. From reading documentation and testing, it does not appear that the 'date' data type is supported. As fas as I know, SQL databases vary greatly in the representation of times and dates. If your database accepts string representations for date fields, you could use an "dtml-var" (rather than "dtml-sqltest") with an appropriate "fmt" argument. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] TAG for file date
CURTIS David writes: I tried to add dtml-var "GuideFile.bobobase_modification_time" But I do not get an output displayed!!! "bobobase_modification_time" is a method not an attribute. You must call it: dtml-var "GuideFile.bobobase_modification_time()" You can resolve problems like this (no output) by looking at the source of the HTML document. In your case, you would have seen: python method at Because this is not a valid tag, your browser has drop it silently. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ZDiscussions Problem
I have a problem using ZDiscussions - First up, i'd like to whine a bit. WHINE-MODE ONWhich product should i use to add a Discussion component to my site? Confera? ZDConfera? ZDiscussions? ZUBB? Squishdot? PTK? Was the Zope 'Portal' deliberately designed to obfuscate the choices available and their respective pros/cons, as well as to make it practically impossible to find useful documentation, or has it just happened this way? I'm just about ready to give up on Zope and go back to hacking Perl, because, even though i have to write 10 times as much difficult-to-read code to get a job done, at least i know that the job is doable, doable in a way that suits me, and that if there is a module to do what i want to do, it will be findable and documented on CPAN. WHINE-MODE OFF I don't like to whine, and i think Zope promises to be a great product, and i am persevering with it because i think it will (once i get implemetation out of the way) make me a great intranet. Many thanks to the developers, you have, on the whole, done a wonderful job. Anyway, my problem is this: I have a ZDiscussion set up in a folder (off the root folder) called TMLDiscussion. I want to put the contents of the discussion in the index_html method of my root folder. So, i put the following in my root index_html method: dtml-with TMLDiscussion /dtml-with (normally there would be code beteen those two tags to output a dtml-tree of messages in the TMLDiscussion object) Even with nothing between the dtml-with tags, i get this error: Error Type: NameErrorError Value: r Whats going on? And how do i display the discussion on my index page? Thanks for any Help -Pete
[Zope] Looking into folders
Hi, zopistas I need to query if one folder has sub-folders in it or not. The query must be into an dtml-tree tag. The idea is to make clickeable only "leave" folders. --- Here's another, Supose this dtml-tree bla bla .. /dtml-tree I want to manipulate every object returned by the "tree" tag like this dtml-tree bla bla .. dtml-let myObject="tree object" dtml-var myObject.someProperty_or_method_or_something /dtml-let /dtml-tree Cheers. -- __ Felipe Alvarez Harnecker. QlSoftware. Tel. 09.874.60.17 e-mail: [EMAIL PROTECTED] Potenciado por Ql/Linux http://www.qlsoft.cl/ __ ___ 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] python product - newbie
hi all, Newbie alert blaring i'm messing around with Boring product, and now wants to do more. i have problems when i got more than one class in a product. this is what i wanted to do. create a guestbook (what else :)) product. GB.py with two classes - GB and GBitem. i can now load GB product, but can't add GBitem. what do i need to do to get the 'Add' selection box? GB.py is available at http://203.106.2.206:8080/Tmp/GB help, pointers, docs appreciated thabks -- -- http://www.kedai.com.my/kk Am I Evil? ___ 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] Problem with adding items to ZClass instance (semi-solved)
Thanks a lot for your help on this weird one! Now that I know what to look into, I'll do that. ___ Ron Bickers Logic Etc, Inc. [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Rik Hoekstra Sent: Tuesday, June 20, 2000 4:53 AM To: Ron Bickers Cc: [EMAIL PROTECTED] Subject: Re: [Zope] Problem with adding items to ZClass instance OK, I downloaded it and I think I found your problem (not wure how to remediate this, though). If you look in the source of the management screen http://localhost/somefolder/IssueTrackerInstance/manage_main, the dropdown list for adding Product looks like this: FORM ACTION="http://localhost/somefolder/IssueTrackerInstance/" METHOD="GET" SELECT NAME=":method" ONCHANGE="location.href='http://localhost/testhier/blup/'+this.opt ions[this.selectedIndex].value" OPTION value="manage_workspace" DISABLEDAvailable Objects OPTION value="manage_addProduct/OFSP/documentAdd"DTML Document OPTION value="manage_addProduct/OFSP/methodAdd"DTML Method OPTION value="manage_addProduct/MailHost/addMailHost_form"Mail Host OPTION value="manage_addTinyTableForm"TinyTable OPTION value="manage_addProduct/OFSP/manage_addUserFolder"User Folder OPTION value="manage_addZMySQLConnectionForm"Z MySQL Database Connection /SELECT INPUT TYPE="SUBMIT" VALUE=" Add " /FORM As you see, most of the items have a manage_addProducts/ as a start. Not so with TinyTables and MySQLConnection. They call the add_TinyTableForm and manage_addZMySQLConnection form. They do not switch the namespace to manage_addProduct (not in the form). Why this is a problem, I can't tell, but this _is_ the problem. I'm not quite sure about the solution. Probably it's best to make a custom manage_main form that does the right incantations for adding products and then map this to your Contents View in the ZCLass definition. As a side I'd like to remark that all products should comply with the same manage_addProduct interface, because the current situation leads to nasty problems. Rik ___ 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] Change Notification
Hi, Bob Barter wrote: Is there a way for an object to be notified that it has been modified? In particular, I want to create Relation objects that relate two arbitrary Folders. Creating the Relation object with a ZClass is easy (even for a newbie like me :-) ), but I need to update the relation links if the destination folder is moved. if it is in aqisition path, dtml-var object url may help. It would give you the URL of the object whereever it is at the moment. May be, you could use ZCatalog otherwise. HTH Tino Wildenhain ___ 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 )