[Zope3-Users] NotFound Exceptions
We're having a Zope problem and I wonder if anyone has experience with it. Basically, we're getting "NotFound" exceptions randomly. This occurs at frequency around 10% of the time. It does not matter which component or view, and we're using a custom skin based upon the Rotterdam skin. We're using Zope 3.3.1. The errors occur in all applications within this one particular instance on one particular server. I've included a traceback here: http://jsa.pastey.net/96278 -- David Johnson [EMAIL PROTECTED] http://www.jsatech.com I would have written a shorter, kinder, clearer email if I had more time. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Michael Bernstein
Has anyone heard from Michael Bernstein? He was a frequent contributor to Zope in many ways and I've not heard or seen a peep from him since early December. -- David Johnson ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Contract Work
Hello. I am heading the engineering for JSA Technologies in the United States. We are building an application in Zope 3 that will link colleges and universities around the world on a financial network. We are looking for Zope 3 contractors to help us complete the project. The project may include, hardware, software, and lots of networking. We are looking to start ASAP, and the project will last 1-6 months. We would expect you to work from your own location. There is no travel required or special hours. We may hire some people for a longer time. Please contact me directly if you are interested. If you have any specialties, please let me know. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Crash
Our Zope 3.2.1 server is crashing and we cannot determine why. The last entry in the access.log is the following: 218.160.132.172 - - [10/Mar/2007:22:11:45 -0500] "CONNECT sextw.com.tw:25 HTTP/1.0" 404 0 "-" "-" There is no other information to indicate why as far as we can tell. No exceptions, nothing. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Zope3 with RDBMS (avoiding ZODB)?
1. Is Zope3 already in use in productive environments? Where are they (URLs)? We are using Zope 3 pretty heavily in a productive environment, but unfortunately the URLs are secure at this point. We build financial applications and we are building more. Our live RDBMS application is an administrative tool that queries 4 different financial databases. 2. Are there any bigger sites running on Zope3 (> 5 mio. accesses per month)? We expect to have loads much greater than this when we are completed, but we do not have any in production. 3. Our main problem is: in our Zope2-application we stored our content in a RDBMS, we avoided ZODB for that stuff. We are definitely going to use an RDBMS (PostgreSQL/MySQL) for the new (Zope3 or Django)-project and still want to avoid ZODB where possible. This architectural decision is carved out of stone. Now, where should we start with it in Zope3 to connect it to an RDBMS? We do mostly SQL/RDBMS. We have tried ZAlchmey, and SQLOs, but we find them both a bit limiting and simultaneous complex to get them to work they way we wanted. In general when one develops and RDBMS application of any size, the database structure can get very complex. In order to integrate them into Zope 3 just right, it's best to manually code the containers and objects. We have been able to simplify the process quite a bit and we are very happy with it. It's amazing scalable.If you do decide to go this way, I would be glad to share our RBDMS package and procedures. We've developed some guidelines to improve development. We use MySQL exclusively. 3.1 We have found 'PostGreSQL Database Adapter' and 'MySQL Database Adapter'. Both are from the Isar sprint (2004-11-06). Are they out of date, or just 'nearly perfect'? Is anybody using these adapters? We use the MySQL adapter. Zope 3 has a bug in the database adapters that requires having to use global utilities (etc/overrides.zcml). It is otherwise stable. In otherwords you cannot currently add and use database adapters in Zope 3 through the ZMI but can through overrides.zcml. 3.2 sqlos - SQLObject Support package (http://codespeak.net/z3/ sqlos/): Is it stable? Has someone experiences with it? In http://mail.zope.org/pipermail/zope3-users/2006-January/001797.html Stephan Richter says: "On the other hand, not many people use sqlos, so it might not be as supported as you wish it would be." Is that still right? 3.3 Also there is 'zsqlmap: Zope3 wrapper for SQLObject' (http://www.zope.org/Members/garanin/zsqlmap). This is not really a solution for us because the version number is 0.01b and the author says: 'NOTE: i tested only postgres.' Not really a capable product... I find it easier to hand code than use the third party packages. We have created our own classes that we find a bit more simple and versatile. I suppose this is a preference thing. 4. Has anybody practical experience and hints with Zope3 and RDBMS? 5. The ZMI: In Zope2 we never used it. Do we need the ZMI in Zope 3 just if we will not use the ZODB for storing our content objects but an RDBMS instead. According to 'Web Component Development with Zope 3' by Philipp von Weiterhausen the ZMI is used to manage content objects stored in the ZODB, so our assumption is, if we do not store them in the ZODB, we do not need the ZMI. Is that right or do we need the ZMI for anything else? Do we need ZMI in Zope3 for administration or can we do that with scripts etc.? The ZMI is everything in regards to management. The new approach is to skin the ZMI to match your own design scheme. The staff who uses our old management applications in UNIX and PHP loves the new Zope 3 stuff we've done. It's so simple that we plan on extending some of the administrative functionality to our clients. 6. Last but not least two quotes from the zope3-dev mailinglist (http://mail.zope.org/pipermail/zope3-dev/2006-February/018217.html): >Shane Hathaway wrote: >> It could >> turn out that people who don't want ZODB really shouldn't use Zope at >> all. >This has been the case in my experience... >Chris Withers I disagree completely. We use SQL although I do wish that SQL integration was stronger. The structure of Zope is excellent for scalability. You'll pay up front a little, but the simplicity and versatility is really great. We've basically only found 2 platforms that scaled well, J2EE and Zope 3. Zope 3 is vastly better in nearly every way in my opinion, except perhaps documentation. The documentation is very weak, but it is a young platform. The content view model of Zope 3 and the clean API's is wonderful. The platform as a whole allows us to develop clean stable scalable code. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Dict Widget
I've seen posts about this but I am confused. Is there a Dict widget? I tried it and I received IInputWidget errors. myfield = Dict(title=u'My Dictionary', key_type=TextLine(), value_type=TextLine()) File "/Users/djohnson/sandbox/Zope-3.3.0/build/lib.macosx-10.3- fat-2.4/zope/component/_api.py", line 103, in getMultiAdapter raise ComponentLookupError(objects, interface, name) ComponentLookupError: ((0x3a00190>, URL=http://127.0.0.1:8080/My%20Contacts/+/addContact.html>), , u'') -- Warm regards, David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Cannot view the instances after I refresh the product in ZMI
Paste the code here. :) On Feb 27, 2007, at 6:16 AM, Alex Cheng wrote: Hello, I have modified my product code and click refresh in ZMI to update the product. Unfortunately when I view its instance in zope. The error message is follows: Error Type: TypeError Error Value: 'NoneType' object is not callable Could you help me? Thanks. -- powered by python ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: Events
This is probably the approach I will follow, but what if I want my container objects notified? I thought you don't... ? This is both a theory and practice question. I want to make sure I follow practices that will not lead me into trouble in the future. In this case I am likely to want an ObjectModifiedEvent so that my objects can be saved if they are modified. For example if I edit an object via browser:editform, an ObjectModifiedEvent will be sent. I am not clear whether Zope will examine every object in my container to see if it has an event handler for ObjectModifiedEvent; which is what it seems to do now. Even if I don't it seems the default Folder implementation follows this logic and so if you have a folder with several large images for example, then you will pay a price whenever an event is issued. In general it seems that any change will result in the entire ZODB being read for each event dispatch...if I still follow the logic here. That's not what I said. It will only happen on object moves, in particular, when a container is moved. It will also only happen for the subitems of that container, not "the whole ZODB", though arguably that can mean a lot of data. I would personally like to see some form of disabling event handlers. Thank you for the clarification. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: Events
You're probably talking about dispatchToSublocations. This is the code that looks up a containers sublocations and dispatches the event to them. One way to prevent this behaviour for your container is to write a new ISublocations adapter for your container that simply returns an empty sequence: class MyContainerSublocations(object): implements(zope.location.interfaces.ISublocations) adapts(...IMyContainer) def __init__(self, context): self.context = context def sublocations(self): return () This is probably the approach I will follow, but what if I want my container objects notified? Even if I don't it seems the default Folder implementation follows this logic and so if you have a folder with several large images for example, then you will pay a price whenever an event is issued. In general it seems that any change will result in the entire ZODB being read for each event dispatch...if I still follow the logic here. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Events
Does anyone know the process by which objects are notified by events? I created a custom container that stores objects in MySQL. However, I noticed that when I add a container that an ObjectAddedEvent is then propogated to every single object in my container, generating nearly 2000 queries. From my reading of the core Zope code, it seems that when an event is triggered it is sent to every single object in every container. This seems rather inefficient if you have either a large container or large objects in your container. Am I understanding this correctly? None of my objects subscribe to events (at least not yet). The problem seems to start in zope.app.container.contained.sublocations, which basically queries all objects in a container and sends an event to all of them. excerpt from zope.app.container.contained.ContainerSublocations: def sublocations(self): container = self.container for key in container: yield container[key] Warm regards, David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Book?
Both books are good in their own. On Feb 19, 2007, at 12:56 AM, Robert Hicks wrote: Is "Web Component Development with Zope 3" the best "resource" to get up to speed on using Zope3? I will be spending a little time getting up to speed on Python itself (with Chun's book) as well. Robert ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Menus
I am curious what methods people use to implements simple web site menus? It seems to be this must be a common task. So far I've done this as follows: 1. Create a skin 2. Create a content type Menu as Ordered Container 3. Create a content type MenuItem as contained by Menu 4. Add a Menu and fill it with MenuItems 4. Register Menu 5. Create a macro which returns the Menu using zapi.getUtility() 6. Use the macro in the skin, and display all the MenuItems. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Error when calling addform
I thought zope.formlib was more complex. As I understand you must create custom browser classes, and page templates. Then you must register those with a page or view ZCML browser directive, each of which is more complicated than the addform. My point is that if there is something new here, I would like to learn. :) On Feb 13, 2007, at 12:04 PM, Stephan Richter wrote: On Monday 12 February 2007 15:56, David Johnson wrote: Many people have offered approaches. I find the simplest and cleanest approach for declaring interfaces is as follows: The cleanest way, in my opinion, is just not to use the addform directive altogether. zope.formlib is the wildly accepted successor. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Applying permissions to users from LDAP
I'm trying to understand this situation also since we face it frequently. The PAU has a Group Folder which works well in this regard. Would the idea of extending Groups in the PAU to include any person in the ldap directory be useful? It seems this would be easier and more flexible. On Feb 12, 2007, at 3:05 PM, Alec Munro wrote: Thanks Philipp! I suspect your first suggested solution will probably be the one that makes sense for us, but I will have to do a little experimentation to be sure. It's very useful that you are able to actually pick out the interfaces and interface methods that are of concern to me. This reminds me that I have to pick up the new version of your book. Alec On 2/9/07, Philipp von Weitershausen <[EMAIL PROTECTED]> wrote: Alec Munro wrote: > I've just succeeded in getting Zope authenticating against my LDAP > directory, using ldapadapter and ldappas. The directory itself is > brand new, and is currently only being used for Zope. > I am able to manually grant permissions to LDAP users, but I'm > wondering if there's a way to automatically grant an LDAP user certain > roles, depending on what groups he or she is in? > > I imagine this could probably be done by extending ldappas, but it > seems like a common problem, so I thought it would be worth asking > here to see if anyone has any other ideas (or has already extended > ldappas themselves). Alec, roles are a concept only known to Zope 3's default security policy, they aren't really a part of the authentication system. While the authentication only identifies principals according by matching login credentials to a user database, the security policy actually decides whether a principal has a certain permission or not (IInteraction.checkPermission). Zope's default security policy happens to use an intermediary concept between principals and permissions called "role". The default policy retrieves the roles and permissions of a principal by adapting the current context object to IPrincipalRoleMap or IPrincipalPermissionMap, respectively (from zope.app.securitypolicy.interfaces). The default adapters for these store the maps persistently in annotations. The Grant view uses the same adapters to persistently modify this information. So, if you want your LDAP users to automatically have certain roles or permissions, one way to go would be to implement custom IPrincipalRoleMap or IPrincipalPermissionMap adapters. This would be a way to adjust the behaviour of the existing default security policy. Another solution for your problem might be a custom security policy (perhaps based on Zope's default one) that inherently knows about which principals get which permissions / roles automatically. This coudl also be made pluggable so that you wouldn't have to write a new security policy every time those sets of permissions and roles change. From a brief look, it seems that this is what the "crowd" concept of schooltool.securitypolicy (http://source.schooltool.org/svn/trunk/schooltool/src/schooltool/ securitypolicy/README.txt) seems to solve. It should be quite trivial to write an "LDAP" crowd (representing all principals from the LDAP database) and then grant that crowd the specified permissions. HTH -- http://worldcookery.com -- Professional Zope documentation and training Next Zope 3 training at Camp5: http://trizpug.org/boot-camp/camp5 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Error when calling addform
Many people have offered approaches. I find the simplest and cleanest approach for declaring interfaces is as follows: class IContactList(IContainer): contains('.IContact') class IContact(Interface): ...schema fields... class IContactContained(IContained): containers(IContactList) Basically, the schema used in your addform CANNOT include IContained. On Feb 11, 2007, at 7:26 PM, Florian Lindner wrote: Hello, I have an addform registered: class IBlogComment(IContained): containers(IBlogEntry) name = TextLine( title = u"Your name", description = u"Your name or nickname", default = u"Guest", required = True) email = TextLine( title = u"E-Mail", required = False) content = Text( title = u"Blog comment content", default = u"", required = True) class BlogComment(Contained): """ A comment to a Blog entry. """ implements(IBlogComment) name = u"" email = u"" content = u"" but when I call the addform resp. click on the addMenuItem I get an system error: 2007-02-11T19:19:46 ERROR SiteError http://localhost:8080/xgm/Blog/2007_02_10_erster_post/+/ AddBlogComment.html Traceback (most recent call last): File "/home/florian/Zope3/src/zope/publisher/publish.py", line 130, in publish obj = request.traverse(obj) File "/home/florian/Zope3/src/zope/publisher/browser.py", line 511, in traverse ob = super(BrowserRequest, self).traverse(obj) File "/home/florian/Zope3/src/zope/publisher/http.py", line 447, in traverse ob = super(HTTPRequest, self).traverse(obj) File "/home/florian/Zope3/src/zope/publisher/base.py", line 263, in traverse obj = publication.traverseName(self, obj, entry_name) File "/home/florian/Zope3/src/zope/app/publication/ publicationtraverse.py", line 55, in traverseName ob2 = ob.publishTraverse(request, nm) File "/home/florian/Zope3/src/zope/app/publisher/browser/ viewmeta.py", line 271, in publishTraverse view = queryMultiAdapter((self, request), name=name) File "/home/florian/Zope3/src/zope/component/_api.py", line 114, in queryMultiAdapter return sitemanager.queryMultiAdapter(objects, interface, name, default) File "/home/florian/Zope3/src/zope/component/registry.py", line 206, in queryMultiAdapter return self.adapters.queryMultiAdapter( File "/home/florian/Zope3/src/zope/interface/adapter.py", line 482, in queryMultiAdapter result = factory(*objects) File "/home/florian/Zope3/src/zope/app/form/browser/editview.py", line 62, in __init__ self._setUpWidgets() File "/home/florian/Zope3/src/zope/app/form/browser/add.py", line 48, in _setUpWidgets setUpWidgets(self, self.schema, IInputWidget, names=self.fieldNames) File "/home/florian/Zope3/src/zope/app/form/utility.py", line 153, in setUpWidgets context=context) File "/home/florian/Zope3/src/zope/app/form/utility.py", line 97, in setUpWidget widget = _createWidget(context, field, viewType, view.request) File "/home/florian/Zope3/src/zope/app/form/utility.py", line 65, in _createWidget return zapi.getMultiAdapter((field, request), viewType) File "/home/florian/Zope3/src/zope/component/_api.py", line 103, in getMultiAdapter raise ComponentLookupError(objects, interface, name) ComponentLookupError: ((, URL=http://localhost:8080/xgm/Blog/2007_02_10_erster_post/+/ AddBlogComment.html>), , u'') what do I have misconfigured here? Thanks, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Standard Macros
Is there a way to use standard_macros in a ZPT Page added via the ZMI? In a page registered via ZCML the following METAL is okay, however in a ZPT Page I receive an error regarding a key error for "views". Any ideas? Warm regards, David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Job Opening
As before, I am posting here because I do not know where else to post. We continue to grow and are searching again for another Zope 3 engineer. We would love to talk with anyone who might be interested. We love Zope and plan on being a big part of its continued success in the marketplace. We are developing a number of large financial applications and systems using Zope. Perks include: * Working from home * Working with Zope 3 * All the other standard 21st century benefits We are flexible and open minded though we do want someone full time as opposed to a consultant basis or project basis. Warm regards, David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Still a skinning problem
I'm not sure if you're familiar with viewlets, but that might be a solution for you here also. On Feb 6, 2007, at 8:05 PM, Florian Lindner wrote: Am Dienstag, 6. Februar 2007 11:43 schrieb Mohsen Moeeni: Until the gurus find time to jump in with `the right` solution... On 2/5/07, Florian Lindner <[EMAIL PROTECTED]> wrote: The line in the template.pt: home works fine as long as context is an IXGM, because index.html is registered for IXGM. But if a view from the IBlog is called is it also rendered in the template.pt but context now is a IBlog which does not have an index.html (or at leat not the one I want) and therefore fails. Your template *assumes* the context will always have an `index.html` view. So it can not be used for a context that doesn't have it. I know that's the problem. At any rate, context is not the best object you can use to link to home. It's better to use site root for that purpose. Something like: home Where you find site root using zope3 APIs in view code and assign it to siteroot. Now there is still the problem that I need a view class that implements siteroot for every view that uses template.pt. Or can I use a view class for the template itself? (tried but did not work). Any other idea or do I don't really understand you? Thanks, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Dreamweaver
Has anyone used Dreamweaver with Zope 3? Any suggestions or tips? The Zope 3 insistence on ++resource++ is a problem. I'm not sure I understand what the motive of the ++resource++ is as opposed to having files relative to the current directory. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Still a skinning problem
I will wager to help...since frequently my posts go unanswered also. I've implemented a few skins with great success. However, if you wait long enough you could a real response from someone like Stephen instead of myself. is registered on the default layer. Since the xgm layer derives from the default layer it correctly uses my template.pt. But the problem is now when a view from the Blog object are called links in the template like home do not work anymore, since context is the Blog and not a IXGM object anymore. Therefore the lookup fails. I do not understand this particular point clearly and this seems to be an important point. Could you provide more specifics? Sounds like you have a blog package installed. The blog package has objects that you can create (presumably blogs and blog entries). The objects have various views, which have links that are being inserted incorrectly? Can reply and provide an example URL to your object and its view? Can you also provide the actual HTML code that is being produced (just the bad HTML code) versus what you would like to see? ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] PT, i18n and dynamic attributes...how to?
I'm very experienced at this stuff myself, I must admit. However it seems Stephan's online book discusses it here: http://wiki.zope.org/ zope3/webgui.html in the later part of the chapter. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] PT, i18n and dynamic attributes...how to?
Are you new to Zope? If I understand correctly, yes it is possible and Zope does an excellent job with this. Both Zope books are particularly good in explaining this. Have you referred to either? On Feb 1, 2007, at 5:51 PM, Sascha Ottolski wrote: Hi, I'm wondering if there is a proper solution to a common problem: translating a page template with dynamic attributes. If I put something like Hi, please click here! in a page template, this wouldn't be translated properly, cause it ends in a msgid like msgid="Hi, please click here!" Therefore I end up writing class MyView: def renderLink(self): return _('Hi, please click here!', mapping={'href': self.click_url()} to get a msgid that reads msgid="Hi, please click here!" Isn't there a way to express the same in the PT alone? Or should the first example do the trick, and it should be considered a bug that it doesn't? Thanks, Sascha -- Lalisio GmbH www.lalisio.com Puschkinstraße 1 fon +49-(0)361/541 43 80 99084 Erfurt fax +49-(0)361/541 43 79 [EMAIL PROTECTED] ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Catalogs Broken?
Thank you kindly. That did the trick. On Jan 31, 2007, at 11:44 AM, Dominique Lederer wrote: David Johnson schrieb: I am trying to figure out what a catalog does, so I began testing. 1. In ZMI add Catalog (no problem) 2. In Catalog add Field or Text index (doesn't matter) 3. Select interface (I'm using a simple "Note" content type I created note.INote) 4. Put in "body" as the attribute 5. Callable is not selected. 6. Press Add button Exception: File "/Users/djohnson/sandbox/Zope-3.3.0/build/lib.macosx-10.3-fat-2.4/ zope/app/catalog/catalog.py", line 75, in _visitSublocations uidutil = zapi.getUtility(IIntIds, context=self) File "/Users/djohnson/sandbox/Zope-3.3.0/build/lib.macosx-10.3-fat-2.4/ zope/component/_api.py", line 207, in getUtility raise ComponentLookupError(interface, name) ComponentLookupError: (, '') No matter what I try this is what I see. you have to add and register a Unique Id Utility first, which is required by the Catalog to work. greetings Dom ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] How To Kill Zope
I'm not sure what I'm doing wrong (again) here, but the following two code snippets in a ZPT will kill the Zope instance: This a Test Page. The title of this page is: This a Test Page. The title of this page is: -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Catalogs Broken?
I am trying to figure out what a catalog does, so I began testing. 1. In ZMI add Catalog (no problem) 2. In Catalog add Field or Text index (doesn't matter) 3. Select interface (I'm using a simple "Note" content type I created note.INote) 4. Put in "body" as the attribute 5. Callable is not selected. 6. Press Add button Exception: File "/Users/djohnson/sandbox/Zope-3.3.0/build/lib.macosx-10.3- fat-2.4/zope/app/catalog/catalog.py", line 75, in _visitSublocations uidutil = zapi.getUtility(IIntIds, context=self) File "/Users/djohnson/sandbox/Zope-3.3.0/build/lib.macosx-10.3- fat-2.4/zope/component/_api.py", line 207, in getUtility raise ComponentLookupError(interface, name) ComponentLookupError: (zope.app.intid.interfaces.IIntIds>, '') No matter what I try this is what I see. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Wierd Error
I am receiving this error and I am not sure why. return self._dump(meta, obj.__getstate__()) File "/Users/djohnson/sandbox/Zope-3.3.0/build/lib.macosx-10.3- fat-2.4/ZODB/serialize.py", line 416, in _dump self._p.dump(state) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/copy_reg.py", line 70, in _reduce_ex state = base(self) TypeError: connect() argument 1 must be string, not Connection Anyone have ideas? -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pluggable authentication, a newbie's question
On Jan 29, 2007, at 5:30 PM, Alexei Ustyuzhaninov wrote: David Johnson пишет: What do you mean by "Your authenticator is registered as a Plugin in a PAU in your current site"? I registered the authenticator as a utility and assigned the utility name to the authenticatorPlugins attribute of the PAU. Is it enough? I'm not sure I follow you here. Normally when you create a custom authenticator you first go into Manage Site add a Pluggable Auth Utility (PAU). Then from within the PAU there are plugins. You can add your custom plugin here. Then you select a credentials plugin and your authenticator plugin. I'm not an expert by any means on PAU, but it seems this is the preferred approach. The authenticators I've written implemented the following: implements (AuthenticatorPlugin,IQueriableAuthenticator,IQuerySchemaSearch) Aha, seems that I see where is my problem. I didn't manage site through ZMI. Is it possible to do this manipulation programmatically? That I don't know. Probably. Why you would want to is another question. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pluggable authentication, a newbie's question
What do you mean by "Your authenticator is registered as a Plugin in a PAU in your current site"? I registered the authenticator as a utility and assigned the utility name to the authenticatorPlugins attribute of the PAU. Is it enough? I'm not sure I follow you here. Normally when you create a custom authenticator you first go into Manage Site add a Pluggable Auth Utility (PAU). Then from within the PAU there are plugins. You can add your custom plugin here. Then you select a credentials plugin and your authenticator plugin. I'm not an expert by any means on PAU, but it seems this is the preferred approach. The authenticators I've written implemented the following: implements (AuthenticatorPlugin,IQueriableAuthenticator,IQuerySchemaSearch) ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pluggable authentication, a newbie's question
I'll try. Your authenticator is registered as a Plugin in a PAU in your current site? I'm not sure the cause without more details, but when I see this happen I've usually neglected one of the following: 1. The credentials plugin is not selected and added. 2. The authenticator plugin is not selected and added. 3. No permissions have been granted to the user, so even though the user is valid, they don't have permissions to do anything and so another authentication is being called as a backup. This is easy enough to debug by putting print statements at strategic points in your plugin and see if and when they show up in the Zope log. The PAU stuff has changed a lot over the history of Zope 3, so I've also found it to happen when using outdated methods such as the ones in Phillips first edition (which have since been updated to reflect the latest methods - thanks Phillip). -- David On Jan 28, 2007, at 5:44 PM, Alexei Ustyuzhaninov wrote: Hello, I try to create a plugin, which could authenticate users against an external database. Here is the code: from zope.component import provideUtility from zope.app.authentication import PluggableAuthentication from zope.app.authentication.interfaces import\ ICredentialsPlugin, IAuthenticatorPlugin from zope.app.authentication.session import SessionCredentialsPlugin from zope.app.security.interfaces import IAuthentication from mypackage.Authentication import MyAuthenticatorPlugin provideUtility(SessionCredentialsPlugin(), ICredentialsPlugin,\ 'My Credentials Plugin') provideUtility(MyAuthenticatorPlugin(), IAuthenticatorPlugin, 'My Authenticator Plugin') pau=PluggableAuthentication('my_') pau.credentialsPlugins=('Cascade Credentials Plugin', ) pau.authenticatorPlugins=('Cascade Authenticator Plugin', ) provideUtility(pau, IAuthentication, 'My Pluggable-Authentication Utility' This code is contained in the file mypackage/__init__.py, mypackage in turn is loaded via ZCML. Both plugins and PAU are registered successfully and I can access them with queryUtility. But the authentication is carried through the standard mechanism and MyAuthenticatorPlugin isn't even called. Could any good soul help me with this case? -- Thanks, Alexei ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Vocabularly
Does anyone know where I can find the latest methods on using vocabularies? I've using one approach for a while now using SimpleVocabulary but that stopped working when I upgraded to 3.3. The errors are "SimpleVocabulary is not called". def getFunctions(): values = [ 'Black', 'Red', 'Blue' ] return SimpleVocabulary.fromValues(values) I thought this would be a good chance to build my vocabulary skills. I followed Stephan's book but I am receiving errors such as: File "/Users/djohnson/sandbox/Zope-3.3.0/build/lib.macosx-10.3- fat-2.4/zope/app/form/utility.py", line 64, in _createWidget field = field.bind(context) File "/Users/djohnson/sandbox/Zope-3.3.0/build/lib.macosx-10.3- fat-2.4/zope/schema/_field.py", line 239, in bind assert ISource.providedBy(clone.vocabulary) I figured that might be outdated, so I tried copying the "Connection Names" vocabularly but again I get the same errors. What am I missing? Where should I look? Warm regards, David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Containers Contains
This I know, so that is exactly my question. What is the preferred approach in Zope? The contains and containers, or the more explicit methods? On Jan 26, 2007, at 11:04 PM, Douglas Douglas wrote: I think the errors are for the contained objects (the ones with 'containers' instructions on its schema definition). I use formlib and when I'm defining the Forms I always omit the implicit fields '__parent__' and '__name__'. If you're using addforms in ZCML you have to use the attribute option to specify all your field but the ones above. HTH. Regards, Douglas. For more check this: http://zope3.pov.lt/irclogs/%23zope3-dev.2006-04-24.log.html __ __ Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Containers Contains
Here is an example that gives me the IInputWidget errors when I use the contains/containers approach: ...interfaces.py... class ICRM(IContainer): """Just a blank container to hold customers.""" contains('.ICustomer') class ICustomer(IContainer,IContained): """A basic customer.""" contains('.IService') containers(ICRM) salesperson = Choice( title = _(u'Sales Person'), description = _(u'The sales person responsible for this account.'), vocabulary = "Sales Person", required=True) supportperson = Choice( title = _(u'Support Person'), description = _(u'The support person responsible for this account.'), vocabulary = "Support Person", required=True) class IService(IContained): """A service provided by the company.""" containers(ICustomer) approveddate = Date( title=_(u"Approved Date(-MM-DD)"), description=_(u"The date this service was approved by finance."), required=False) ... class CRM(BTreeContainer): """Just a blank container to hold customers.""" implements(interfaces.ICRM) class Customer(BTreeContainer): implements(interfaces.ICustomer) salesperson = u'' supportperson = u'' class Service(BTreeContainer): implements(interfaces.IService) approveddate = u'' ... On Jan 26, 2007, at 9:24 PM, Marius Gedminas wrote: On Fri, Jan 26, 2007 at 07:48:36PM +0100, David Johnson wrote: When setting up container/contained relationships, what is the proper approach? Is it the approach outlined in Stephan's book with IContainer, __setitem__, and preconditions? Or is it "contains" and "containers"? contains() and containers() is a newer and prettier way to achieve the same result. It didn't exist when Stephan's book was written. I have been having some problems and would be curious the definitive approach. The former is more complicated and so I find make lots of coding errors. The latter is simple but I find it causes strange IInputWidget errors. Could you show us some code? Marius Gedminas -- "Nuclear war can ruin your whole compile." -- Karl Lehenbauer ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Containers Contains
When setting up container/contained relationships, what is the proper approach? Is it the approach outlined in Stephan's book with IContainer, __setitem__, and preconditions? Or is it "contains" and "containers"? I have been having some problems and would be curious the definitive approach. The former is more complicated and so I find make lots of coding errors. The latter is simple but I find it causes strange IInputWidget errors. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] User Registration
Does anyone have or know of an out of the box User sign-up, registration, and login product? This is a frequently requirement of course for publicly available web sites, such as a message board. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Access to request in content object and object path in doctests
I do lots of database stuff, like what you're describing. I got lost in the threads here, but my general advice is the following: 1. Do not mix content with views, this destroys the scalability aspects of Zope and will hurt you later. When ever you find Zope frustrating it often because you're trying to do something that is not in your best interests. 2. Generally you will want to create content with methods that can perform the database operations you would like. For example, I recently created a Container/Folder that contains object from a database. The container is persistent. The container however loads the content from an SQL database. I can then edit and view the objects from the SQL database like ZODB objects. I have some code that I can share here. In another example, which may suite your needs, I created a Zope site in which customers can lookup orders by an order id. My content object is effectively a class "Order", which has a method, "getOrderById", and that takes an order id as the parameter. getOrderById() queries the database and returns the order as a dictionary. My view is a page that simply calls self.context.getOrderById() with the orderid as the first parameter. The advantage of this approach is that you can de-couple the database from the view and content objects. You can the ability to do lots of other cool stuff as well, like create XML-RPC views without having to do much extra coding (because all the code is hidden in your content object). 3. There are times when your content and views will need to mesh a bit more tightly. In this case, you can create views on your context object. I'm not very good with zope terminology at times, but this view is a different zope:view than the browser:view. For example, I have a shopping cart application and the cart of course is different for each client. The cart also resides in an SQL database. So I have a content type: Cart, which has a view, that accepts a request, and can effectively remold the Cart content type into a specific cart for a specific client. The client will after all need to manipulate the cart to add, delete, and edit items. On Jan 24, 2007, at 11:50 PM, Maciej Wisniowski wrote: Hi Two questions... Is this possible to get request object in content class. In Zope2 this was possible with simple self.REQUEST. In Zope3 I tried self.request but I only get errors. Maybe this is a feature, and I'm not supposed to access request object from content class? Another question. I'm trying to write tests for my content object. Because I want some caching facilities I'm using getLocationForCache from zope.app.cache.caching. and because of this: zapi.getPath(obj) In short it is like: class MyClass(Persistent): (...) def myfunction(self): location = zapi.getPath(self) return location In the tests I always get location == None. I'm using doctests like: test_content = MyClass() test_content.myfunction() placefulsetup adds some objects like root etc. but I'm not sure how I should add my object to this. Any clues? -- Maciej Wisniowski ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Using formlib schema.Choice with zc.table FieldColumn
I didn't know there was something called zc.table. What are you trying to accomplish? On Jan 24, 2007, at 8:02 AM, <[EMAIL PROTECTED]> [EMAIL PROTECTED]> wrote: Does anyone know if there is a trick in getting Choice schema's to work with zc.table FieldColumn or am I likely doing something wrong? Thanks, Kevin Smith ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Zope 3 PAM or /etc/passwd authentication?
I would love this as well. I've written authentication stuff in Zope 3 (both Philips and Stephans books are outdated here), but I've never worked with PAM and python. I would be glad to provide my half to anyone good with Python. Seems it should be pretty simple if you know PAM (which I don't). On Jan 23, 2007, at 8:28 PM, Alec Munro wrote: Hi List, I'm wondering if anyone knows of a way to integrate Zope with /etc/passwd? PAM was suggested, but I don't know too much about that. I suppose I could probably write my own, but I would prefer to avoid that if possible. Anyone have any experience with this? It seems like it's probably a fairly common requirement. Thanks, Alec ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] interview for my diploma thesis about Zope 3 in education
Dominique, Our company services Higher Education exclusively and so we have some experience here. On Jan 22, 2007, at 1:08 PM, Dominique Lederer wrote: Hello list! currently i am writing my diploma thesis at the University of Applied Science in Austria, Vienna. The topic is about the usage of Python and Zope (3) in education. There are a lot of papers concerning Python and education, but i found not much about Zope there. So this seems an interesting topic to discuss. For my diploma thesis, i would like to ask you to anwer or discuss a few questions, to see, what you think about this. (of course i will cite all the stuff) Here they are: * Do you think Zope (3) can be used at school or university level to support topics in computer science education? What topics would you recommend? Why? I definitely think Zope 3 can be used to support education. We plan on developing a number of applications in this area. It seems at present that universities are focusing on J2EE and .NET, like most companies. We are also noticing an increasing ability of universities to do their own development. Traditionally many of the software applications that universities use have been purchased. We see an increasing desire to build and customize applications in house. We also find however that in universities the funding and resources required to manage a J2EE or a .NET project are not necessarily there. We believe Zope could fill this role because it is faster to develop in, and python is fairly easy to learn. We find that universities tend to have developers who are a bit less experienced, and this sometimes includes administrators who actually want to do their own development. J2EE and .NET is not easy to pick up for the novice. In this area Zope 3 is particularly challenging in comparison to Zope 2, however there are entry points in Zope 3 with a minimal amount of TTW development. In this sense I personally feel strongly that Zope 3 needs to have a greater emphasis on TTW development so that it can satisfy the needs of the intermediate developers. However I feel that Zope 3 is such a clean and well developed platform that more of these tools will show up. * How would you convince someone who is in charge to use Zope 3 in his curriculum? It really depends upon the costs and benefits and the organizations goals. I always find it better to examine products that exist and that suit your needs. Zope was developed (as I understand and may be incorrect) by a professor in Computer Science in order to explain web development and instruction on application development. Read about the history of Zope. Personally, our company prefers not to hire people with Computer Science training. This is because we find that professors and university education in this area is more philosophical and a bit out- dated; students tend to come out with a mindset that says "what's the most proper way to complete a project?" rather than "How can I get this done?" J2EE and .NET are similar. In engineering there is the constant battle between form and function. J2EE and .NET are all about form. They are very elegant, and fit all the philosophical models of computer science, and in particular UML. This however is their weakness. When engineering the ultimate goal is to come up with a great solution to some problem. The solution starts as a thought and needs to be converted into a application. Programming languages that reduce the barriers between thought and application are preferred. PHP does this very well for example, however it suffers from scalability issues because it is all about function and not form (ditto Perl). In my experience when you use J2EE you spend a lot of time converting the problem in your head into a J2EE application. Because it does not directly parallel thought it is prone to error; when an application fails it is hard to get your head around it and fix it. As Stephan Richter once told me, Zope strikes a nice balance between the direct thought to coding present in PHP and the well thought out form of a J2EE application. I wrote an application to list automobiles online: it took 2 files/objects in Zope, and 36 in Java. Java can be so abstracted and modular that you spend more time trying to code than actually solving and implementing the problem and being productive. J2EE and .NET are also about marketing. It is important to note that none of the major providers: Oracle, Sun, or Microsoft use these technologies in their own core applications. Most of them still use C/C++. They will use J2EE or .NET for auxiliary applications such as the Oracle install, but it stops there. * How do you see Component Based Software Engineering (CBSE) related to Zope 3? What are the differences? Is Zope 3 an alternative for other component based frameworks in the industry and why? I'm not s
Re: [Zope3-Users] __setitem__ works, __delitem__ fails on custom site
No, not exactly. IFolder is derived from IPossibleSite. In any case getting all the permissions right can be tricky. Even when you think you've gotten you find later you missed one here or there. That's why I like deriving from IFolder. The kinks have been worked out and where I forget something IFolder and Folder probably provide default implementations. It just tends to work better all around. On Jan 22, 2007, at 4:02 PM, Roy Mathew wrote: Thanks, David - that did the trick. I changed the decl: class IQSite(IPossibleSite): to: class IQSite(IFolder): and had to remove the IWriteContainer and IReadContainer perm decls to avoid a conflict. I am still not sure why that would make the difference - since QSite extended Folder to begin with, wasn't it also of type IFolder? Roy. David Johnson writes: From my experience I find it better to derive from IFolder for the interface and Folder for the class. I can then set which objects are allowed or not allowed to be added based on the standard preconditions/IContained lines in the interface definitions. I set the schema to the primary interface of my class. On Jan 22, 2007, at 1:06 AM, Roy Mathew wrote: Hi Folks, I am trying to create a custom Site object, using the below declarations; all goes well when addding an object O1 to the QSite, but when trying to delete object O1, I get: ForbiddenAttribute: ('__delitem__', <...QSite object at 0xa61dcd6c>) The code: class IQSite(IPossibleSite): "custom site" class QSite(Folder, site.SiteManagerContainer): implements(IQSite) ... set_schema="zope.app.container.interfaces.IWriteContainer" /> Since both __setitem__ and __getitem__ belong to the same interface, I am baffled - what gives? -- Thanks, Roy Mathew. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Checkout
Ah! Yes. I did not explain very clearly...again.We use SQL because storing lots of data in sessions can be a bit slow (or at least that's what the doc says). The use of containers is not to create new objects everytime someone checks out, but to define the checkout process in general. We will be producing eCommerce sites and we want to give our clients the ability to create and customize the checkout process for their end consumers. So we define a Checkout container that we add to the site. Then we allow the client to add the steps they want to see in their checkout process. When the end consumer checks out we just step through the each object in the Checkout container. Each Step uses formlib to get checkout data. In otherwords our Checkout container has a view which is a combination of all the steps. This is one of the reasons why I miss the acquisition available in Zope 2. It would be easier to do. I may reconsider the use of SQL based upon your comments and instead use sessions. It is a lot of extra coding to read and write from a SQL database. On Jan 20, 2007, at 10:59 AM, Philipp von Weitershausen wrote: David Johnson wrote: The best process I've come up with so far is the following: 1. Create a Container that can contain only IStep (which I call IWizard) 2. Create components that are derived from or provide IStep 3. Add the components and sort them according to the order they should be displayed. 4. Create a view on the container that guides the user through the steps. You don't need to create objects just for the sake of displaying a form. Its also expensive to do this every time somebody puts something in the shopping cart or goes to checkout. I'd keep the data in sessions; zope.formlib is flexible enough to be customized where its initial data comes from (sessions) and where to put it after form submittal (sessions, SAP, etc.). See my other reply. -- http://worldcookery.com -- Professional Zope documentation and training 2nd edition of Web Component Development with Zope 3 is now shipping! ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] __setitem__ works, __delitem__ fails on custom site
From my experience I find it better to derive from IFolder for the interface and Folder for the class. I can then set which objects are allowed or not allowed to be added based on the standard preconditions/IContained lines in the interface definitions. I set the schema to the primary interface of my class. On Jan 22, 2007, at 1:06 AM, Roy Mathew wrote: Hi Folks, I am trying to create a custom Site object, using the below declarations; all goes well when addding an object O1 to the QSite, but when trying to delete object O1, I get: ForbiddenAttribute: ('__delitem__', <...QSite object at 0xa61dcd6c>) The code: class IQSite(IPossibleSite): "custom site" class QSite(Folder, site.SiteManagerContainer): implements(IQSite) ... interface=".interfaces.IQSite" /> set_schema=".interfaces.IQSite" /> Since both __setitem__ and __getitem__ belong to the same interface, I am baffled - what gives? -- Thanks, Roy Mathew. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Checkout
The best process I've come up with so far is the following: 1. Create a Container that can contain only IStep (which I call IWizard) 2. Create components that are derived from or provide IStep 3. Add the components and sort them according to the order they should be displayed. 4. Create a view on the container that guides the user through the steps. On Jan 19, 2007, at 4:28 PM, Christian Theune wrote: Hi, Am Freitag, den 19.01.2007, 16:20 +0100 schrieb David Johnson: Yes. Excuse my lack of explanation. When developing an eCommerce site, a customer will in the end need to check out. They will have a shopping cart (which can be handled through sessions and a SQL database), and then they will need to select a form of payment, a delivery address, and complete their purchase. It's been my experience this is one the most difficult parts of an eCommerce application. I realize in retrospect that checkout may imply something about source control. It did for me. :) The confusion is gone now. Although I can't help you directly, you've got a better chance for an answer by somebody who knows now. ;) Christian -- gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Checkout
Yes. Excuse my lack of explanation. When developing an eCommerce site, a customer will in the end need to check out. They will have a shopping cart (which can be handled through sessions and a SQL database), and then they will need to select a form of payment, a delivery address, and complete their purchase. It's been my experience this is one the most difficult parts of an eCommerce application. I realize in retrospect that checkout may imply something about source control. Thanks On Jan 19, 2007, at 11:56 AM, Christian Theune wrote: Am Freitag, den 19.01.2007, 09:55 +0100 schrieb David Johnson: Has anyone implemented a check out procedure? Any thoughts? It is a bit different than standard Zope components because it often has steps, goes forward and back, and numerous other reasons. I don't understand your question, can you rephrase it a bit? Christian -- gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Checkout
Has anyone implemented a check out procedure? Any thoughts? It is a bit different than standard Zope components because it often has steps, goes forward and back, and numerous other reasons. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Can't rename objects
But I want to choose names for certain kind of objects. It works when I'm not implementing IContainerNamesContainer. As before see my previous post, but I'll paste it here: 1. Since I have a custom container that is derived from IContainer, it is already configured as a IContainerNamesContainer, and if I override chooseName() and checkName(), I get the desired effect of choosing my own names. 2. I did not adapt my container to IContainerNamesContainer, and so Rename is now enabled. This I do not understand, but it works. 3. I put a custom template in the browser:addform directive. The template was a copy of the zope.app.form.browser.add template, but I edited out the "Object Name" field. I have the desired effect. All seems to work very well. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Can't rename objects
See my post about 2 weeks ago. If you Adapter to IContainerNameChooser rename will not be allowed. Do not adapt to IContainerNameChosoer. On Jan 16, 2007, at 10:37 PM, Florian Lindner wrote: Am Dienstag, 16. Januar 2007 22:15 schrieb Christian Theune: Do you have a specific exception with traceback that prevents you from renaming? So far I have tried it only using the ZMI (logged in as manager). There is no rename button and also if I add another object I can't name it, it's just names like "Folder-n". Just no possibility to even try. How to test it best programmatically? The security declarations are: set_schema=".interfaces.IXGM" /> Thanks, Florian Christian Am Dienstag, den 16.01.2007, 21:05 +0100 schrieb Florian Lindner: Hello, I have a container object to which I can add and remove object but can not rename them. I suspet my I namechooser to be faulty: from zope.app.container.interfaces import INameChooser from zope.app.container.contained import NameChooser class XGMNameChooser(NameChooser): implements(INameChooser) def chooseName(self, name, object): if IAbbreviation.providedBy(object): # my name choosing code return n else: return super(XGMNameChooser, self).chooseName(name, object) registered like that: furthermore the objects interface implements: IContainer, IContained, IPossibleSite, IAttributeAnnotatable, IContainerNamesContainer. the class itself: BTreeContainer, SiteManagerContainer What's wrong? Thanks, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: selling zope to a CTO
I think the sell is going to be hard if the CTO wants to conform to a world dominated by J2EE and .NEt projects. One chooses Zope 3 because they are more concerned about productivity, quality, and scalability. There are trend followers and trend setters and I believe Zope is going to be a part of the future. Zope 3 is the best technology I've seen since Linux. At the same time, that there are not any presentations sort of speaks for itself. From my experience, the Zope community is more interested in building quality technology than selling it. Sun and Microsoft push their technologies because they make money. Keep in mind that neither Sun, Microsoft, or Oracle use J2EE for their core applications. That should speak volumes. The only compelling information I've seen revolves around Python being roughly 5 times faster to develop in than Java, from an ROI perspective. We recently bought Microsoft .NET CRM solution only to can it in favor a Zope solution. It was quicker to create our own CRM from scatch then to install the Microsoft product, and our product is more robust. I would be interested in anything you come up with our see, and I would be glad to offer more on our experiences. -- David On Jan 11, 2007, at 5:31 PM, Roy Mathew wrote: Philipp von Weitershausen wrote: |Christophe Combelles wrote: |> Roy Mathew a écrit : |>> Hi all, |>> |>> Does anyone know of a canned presentation or slides/papers that would |>> help convince an openminded CTO/CIO that Zope (z3) makes business |>> sense in a world dominated by huge J2EE and .NET projects. |>> |> |> yes :) but I guess everybody knows it |> http://oodt.jpl.nasa.gov/better-web-app.mov | |That's about Zope 2/Plone (which still makes it a great presentation, |but I don't think it's what Roy's looking for) Indeed, I like that presentation very much, and it helped convince our technology managers that Zope made sense; however, it is too technically focused - I was hoping for a 15-20 minute sort of thing with some punch, for the higher level execs. -- Thanks, Roy Mathew.___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Name chooser and Renaming
Okay. Since I didn't get a response I assumed no one else knew either. I figured out the following: 1. Since I have a custom container that is derived from IContainer, it is already configured as a IContainerNamesContainer, and if I override chooseName() and checkName(), I get the desired effect of choosing my own names. 2. I did not adapt my container to IContainerNamesContainer, and so Rename is now enabled. This I do not understand, but it works. 3. I put a custom template in the browser:addform directive. The template was a copy of the zope.app.form.browser.add template, but I edited out the "Object Name" field. I have the desired effect. All seems to work very well. On Jan 8, 2007, at 6:24 PM, David Johnson wrote: Is it possible to have both a NameChooser and an ObjectRenamer. If so...how? It seems that zope.app.container.browser contents.py has the following code: self.supportsRename = ( self.supportsCut and not IContainerNamesContainer.providedBy(self.context) ) So if you have a name chooser then you cannot rename. I would like users to be able to choose the name of object (within certain basic restrictions which is why I want the name chooser), and then be able to rename the object within the same conditions. Thoughts? -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Name chooser and Renaming
Is it possible to have both a NameChooser and an ObjectRenamer. If so...how? It seems that zope.app.container.browser contents.py has the following code: self.supportsRename = ( self.supportsCut and not IContainerNamesContainer.providedBy(self.context) ) So if you have a name chooser then you cannot rename. I would like users to be able to choose the name of object (within certain basic restrictions which is why I want the name chooser), and then be able to rename the object within the same conditions. Thoughts? -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] mapply error
Okay. It appears the problem is that the object is part of a content container, and this container has a __getitem__ method which was not returning the item. It is working. Thanks. On Jan 4, 2007, at 6:32 PM, David Johnson wrote: I have a content type that gives the following exception whenever I try to click on it. Not sure why. Any ideas? File "/usr/share/zope3/lib/python/zope/publisher/publish.py", line 56, in unwrapMethod raise TypeError("mapply() can not call %s" % `object`) TypeError: mapply() can not call None How can I troubleshoot? Thanks in advance. David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] mapply error
I have a content type that gives the following exception whenever I try to click on it. Not sure why. Any ideas? File "/usr/share/zope3/lib/python/zope/publisher/publish.py", line 56, in unwrapMethod raise TypeError("mapply() can not call %s" % `object`) TypeError: mapply() can not call None How can I troubleshoot? Thanks in advance. David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] ComponentLookupError
I'm very confused by the following error. Whenever I add certain content components I get the following error when add form is generated (I'm using standard addform). ComponentLookupError: ((0x4203972c>, URL=http://192.168.81.89:8090/CRM/Vanderbilt/@@+/action.html>), , u'') I am not sure where to go with this. I have three different instances of Zope and two generate this error and one does not. The object listed in the error is not the same between content types, although it is consistent within a content type. -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Registered utility is never found
Try: -- utils = zapi.getAllUtilitiesRegisteredFor(IYourInterface) for util in utils: print util -- You can list all the returned utilities. See if your utility is returned, and see what name it is registered under. If not, try with a known interface. Can you provide the results here? On Tue, 12 Dec 2006 15:29:55 +0100, Garanin Michael <[EMAIL PROTECTED]> wrote: FB wrote: On Tue, Dec 12, 2006 at 04:42:56PM +0300, Garanin Michael wrote: traceback, please. Hmm ... how? It just doesn't return the utility as expected (it returns None). There is no error shown in any way. from APIDOC: """ * *|getUtility(interface, name='', context=None)| * . If one is not found, raises ComponentLookupError. < must be EXCEPTION !!! """ There are not "ComponenLookupError" exception? Why you find bug in "getUtility"? ;-) (sorry my english) ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Registered utility is never found
Hi, is there any reason why a registered utility which is persistently stored inside the site manager is never found via zapi.getUtility(IMyInterface) ? It's been my experience this is caused by registering with a name rather than leaving the registration blank. (This confused me for the longest time). ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Clipboard
I created a custom content container. However, when I copy(or cut) something to the clipboard, the Paste button does not show up. What am I missing? The content objects seem to be functional in all regards and are stored in a MySQL database, and are inherited from only the "Contained" class (so they can be contained of course). Thanks in advance. -- David -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] sqlos 0.3.0 broken with zope 3.2.1?
ZAlchemy is supposed to be very good. It is based on the Python SQLAlchemy package. Personally I've found it to be a bit complex and have not invested much time in it, and have instead found it fairly easy to build my own packages and containers; but I'm a do it yourselfer. It obviously depends upon your needs. Most people would say go with ZAlchemy. Sqlos apparently does work but seems relatively dead. I had it installed with Zope 3.2 (after I got the latest release from SVN), the one off the site didn't work for me. On Thu, 2006-11-30 at 16:41 -0500, Giovannetti, Mark wrote: > Hi, > > Has anyone gotten sqlos 0.3.0 to work with zope 3.2.1 or later? > > I get a pile of rdb.interface not found errors. When I fix them > I get a pile of annotation.interface errors. When I fix them I > get a pile of ... well, you get the picture. > > If sqlos is broken for zope 3.2.x what other options are there > for using postgresql with zope 3.2? I have psycopgda > working correctly (i.e. can use a SQL Script). Anyone have > a good example of how to use this adapter to do a simple SQL > query in python via zope (I'm a newbie, be gentle) and display > it in an HTML table? > > I have googled and keep coming up with the same docs that > I don't understand. > > Thanks in advance. > Mark > ___ > Zope3-users mailing list > Zope3-users@zope.org > http://mail.zope.org/mailman/listinfo/zope3-users > ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Zope 3 Theory: Addform and Objects
I am creating a custom content container and am getting the intricacies of the addform browser zcml directive. When I add an object in the ZMI to my custom container I notice that the __setitem__() method is called after I hit "Add" button. I also see how the set_before_add and set_after_add options are used. I notice that when the container's __setitem__ method is called with the new object, the attributes are not set. When do the attributes get set? In the editform directive this issue is resolved by providing a class and an update() method. I can be notified after the attributes have been changed so that I can perform my custom handling. However, how is custom handling done in addform? I could specify all the fields in the "set_before_add" option, but this is tedious and does not work well if the schema changes (because I have to remember to update the ZCML as well). My motive is that I'm creating content objects which will be stored in a MySQL database. When the objects are added through the ZMI I want to issue an update statement to the database with the newly added objects attributes. Hopefully I'm making some sense. Warm regards. Thanks in advance. -- David Johnson ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] Custom Content Container
I figured out the problem. In my interfaces I was using the contains and containers methods. When I stuck to the more tedious __parent__ = ... approach as outlined in Stephan's book, all was solved. Thanks. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of David Johnson > Sent: Tuesday, November 28, 2006 2:21 PM > To: 'Tom Gross' > Cc: zope3-users@zope.org > Subject: RE: [Zope3-Users] Custom Content Container > > Yes indeed. I'm only using 1 Text and 3 TextLine fields. This is my first > attempt at this so I'm trying to keep it fairly simple. > > > > -Original Message- > > From: Tom Gross [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, November 28, 2006 2:05 PM > > To: David Johnson > > Cc: zope3-users@zope.org > > Subject: Re: [Zope3-Users] Custom Content Container > > > > Hi David, > > > > which fields does your IOwner-interface consist of? You get this error > > if you call an auto generated form from a List-field, without > > having value_type specified, but there are other scenarios, so this > > information would be helpful. > > > > Cheers > > -Tom > > > > David Johnson wrote: > > > > > > I created a custom content container that reads entries from a MySQL > > > database and allows editing of the container objects. Or at least that > > > is my desire... > > > > > > The content container by itself "seems" to work well. However when I > > > click on an object in the contents ZMI view, I receive the following > > > exception: > > > > > > ComponentLookupError: (( > > 0x420f450c>, > > > > > URL=http://192.168.81.89:8070/++etc++site/default/TPM%20on%20Dev/4/@@editT > > PMOwner.html>), > > > , u'') > > > > > > > > > I'm not quite sure why "IInputWidget" is being looked up, though I > > > suppose it has something to do with the form I am creating, and I'm > > > not sure why it is not finding what it is looking for. > > > > > > editTPMOwner.html is simply a ZCML directive that > > > uses schema IOwner. > > > > > > Any ideas or thoughts? Thanks so kindly in advance. > > > > > > -- > > > > > > David Johnson > > > > > > -- > -- > > > > > > ___ > > > Zope3-users mailing list > > > Zope3-users@zope.org > > > http://mail.zope.org/mailman/listinfo/zope3-users > > > > > > ___ > Zope3-users mailing list > Zope3-users@zope.org > http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] Custom Content Container
Yes indeed. I'm only using 1 Text and 3 TextLine fields. This is my first attempt at this so I'm trying to keep it fairly simple. > -Original Message- > From: Tom Gross [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 28, 2006 2:05 PM > To: David Johnson > Cc: zope3-users@zope.org > Subject: Re: [Zope3-Users] Custom Content Container > > Hi David, > > which fields does your IOwner-interface consist of? You get this error > if you call an auto generated form from a List-field, without > having value_type specified, but there are other scenarios, so this > information would be helpful. > > Cheers > -Tom > > David Johnson wrote: > > > > I created a custom content container that reads entries from a MySQL > > database and allows editing of the container objects. Or at least that > > is my desire... > > > > The content container by itself "seems" to work well. However when I > > click on an object in the contents ZMI view, I receive the following > > exception: > > > > ComponentLookupError: (( > 0x420f450c>, > > URL=http://192.168.81.89:8070/++etc++site/default/TPM%20on%20Dev/4/@@editT > PMOwner.html>), > > , u'') > > > > > > I'm not quite sure why "IInputWidget" is being looked up, though I > > suppose it has something to do with the form I am creating, and I'm > > not sure why it is not finding what it is looking for. > > > > editTPMOwner.html is simply a ZCML directive that > > uses schema IOwner. > > > > Any ideas or thoughts? Thanks so kindly in advance. > > > > -- > > > > David Johnson > > > > > > > > ___ > > Zope3-users mailing list > > Zope3-users@zope.org > > http://mail.zope.org/mailman/listinfo/zope3-users > > ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Custom Content Container
I created a custom content container that reads entries from a MySQL database and allows editing of the container objects. Or at least that is my desire... The content container by itself "seems" to work well. However when I click on an object in the contents ZMI view, I receive the following exception: ComponentLookupError: ((, http://192.168.81.89:8070/++etc++site/default/TPM%20on%20Dev/4/@@editTPM Owner.html>), , u'') I'm not quite sure why "IInputWidget" is being looked up, though I suppose it has something to do with the form I am creating, and I'm not sure why it is not finding what it is looking for. editTPMOwner.html is simply a ZCML directive that uses schema IOwner. Any ideas or thoughts? Thanks so kindly in advance. -- David Johnson ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] UnicodeDecodeError
Good morning, I’m getting a UnicodeDecodeError during the display of a ZPT and I’m not sure how to get rid of it. I know the problem is related to the fact that we are trying to display text that contains characters above the 128 range. We are displaying information from a database and unfortunately our users have putting non-Unicode characters in. We would be glad to just strip out the non-compliant characters, but I am not sure how. Any ideas or suggestions are welcome. File "/usr/share/zope3/lib/python/zope/tal/talinterpreter.py", line 770, in do_insertStructure_tal text = unicode(structure) UnicodeDecodeError: 'ascii' codec can't decode byte 0x92 in position 739: ordinal not in range(128) Corresponding TAL code: Password Sent -- David Johnson ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Logout
Does anyone know how to logout? We’ve been using logout.html as the logout page for Zope Realm Basic Auth, and it does not seem to log us out. We’re using IE 6. It says it has logged us out, but does not. Closing the browser works, but that seems to be the only solution. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Functional Tests
I decided it’s about time to use functional tests. I’ve been setting them up with the following code and I get the following error (I’ve never gotten it to work): import time import unittest from zope.app.tests.functional import BrowserTestCase from merchantlink.app import MerchantLink class MerchantLinkTests(BrowserTestCase): def test_add(self): response = self.publish( "/+/merchantlink.app.MerchantLink=", basic='mgr:mgrpw', form={'add_input_name':u'merchantlink', 'UPDATE_SUBMIT' : 'Add'}) self.assertEqual(response.getStatus(),302) self.assertEqual(response.getHeader('Location'), 'http://localhost/@@contents.html') merchantlink = self.getRootFolder()['merchantlink'] def test_suite(): return unittest.TestSuite(( unittest.makeSuite(MerchantLinkTests), )) if __name__=='__main__': unittest.main(defaultTest='test_suite') Results: ... IOError: [Errno 2] No such file or directory: '/home/djohnson/dev/whiteboard/lib/python/merchantlink/browser/tests/ftesting.zcml' -- David Johnson ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] Re: Performance
Okay. I think I figured it out. It seems that images and large objects are the main culprit. We have very few images, mainly just icons for the content types and tabs. I discovered this by using lynx and with IE disabling images. So the new question is: how do I speed up image downloading? I'm guessing this has something to do with the ZODB? > -Original Message- > From: [EMAIL PROTECTED] [mailto:zope3- > [EMAIL PROTECTED] On Behalf Of Philipp von > Weitershausen > Sent: Sunday, August 27, 2006 5:46 AM > To: zope3-users@zope.org > Subject: [Zope3-Users] Re: Performance > > David Johnson wrote: > > Good morning. I've built and application for Zope 3 and it seems to run > > fairly slow (the logs show 2-5 seconds for a single page load). The > > graphic usage is relatively low (I've tested the same html file in PHP > > and the speed is 0.10-0.20 seconds). > > I'm not sure what "graphics usage" and "testing the same html file in > PHP" are supposed to mean. I also don't understand what such a test is > supposed to show. > > There can be numerous bottlenecks in a Zope application. Rendering Page > Templates (which admittedly are not the fastest templating mechanism in > the world) is only one. Having unit test and integration tests for your > components can make it a lot easier to track down such bottlenecks. The > test runner also has a profiling option (--profile) that I might help > you show where you spend most of your time. It's a good idea to combine > this with --repeat=N so that the tests are run several times in a row > and will outweigh the overhead spent in the test runner in the statistics. > > Philipp > > ___ > Zope3-users mailing list > Zope3-users@zope.org > http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Performance
Good morning. I’ve built and application for Zope 3 and it seems to run fairly slow (the logs show 2-5 seconds for a single page load). The graphic usage is relatively low (I’ve tested the same html file in PHP and the speed is 0.10-0.20 seconds). What is the best way to test or improve performance? I know there are no simple answers, but I know little about Zope 3 performance and troubleshooting. -- David Johnson [EMAIL PROTECTED] 201 Main Street Suite 1320 Fort Worth, TX 76102 (877) 572-8324 x2200 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Products/Ordered Container
I've tried to follow the SVN, but I'm not quite sure where products are for Zope 3. Where should I look? The link on the zope.org site for zope-3 products points to the root of the Zope SVN. In particular, I'm interested in an ordered container in which the order can be manipulated (rather than add order or alphabetical). In general I'm curious to see what's out there. As well as possible contribute some small products I've written. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Currency Formatting - Does it work?
Does currency formatting work? When I use the feature in page templates I see a strange character where the US Dollar sign should be. I've tried in other locales and it always seem to have this symbol. I would paste it here, but I dont' know how it will affect anyone's mail programs. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Time Zones/Internationalization
That's great! That does seem to figure that out. The secrets of Zope. On Mon, 2006-06-05 at 18:53 -0300, David Pratt wrote: > Hi David. pytz is a standard python package included in zope that can > help you manage time zone issues. There are methods to represent time > that is properly offset according to a large database of global > timezones. This will help you present the view of time you wish to your > application's users. Refer to the documentation in the package to give > you an idea of what is possible. > > Regards, > David > > David Johnson wrote: > > How do you deal with time zones in your applications, in regards to > > dates and times entered by users of the application. > > > > For example consider a content object that represents a store, and > > includes the store hours. A store owner may enter their opening ours as > > 0800 in their timezone. Do you store this as 0800? How does locale fit > > in both in terms of store owners and store customers (who may be in > > different time zones)? > > > > > > > > > > ___ > > Zope3-users mailing list > > Zope3-users@zope.org > > http://mail.zope.org/mailman/listinfo/zope3-users > > > ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Time Zones/Internationalization
How do you deal with time zones in your applications, in regards to dates and times entered by users of the application. For example consider a content object that represents a store, and includes the store hours. A store owner may enter their opening ours as 0800 in their timezone. Do you store this as 0800? How does locale fit in both in terms of store owners and store customers (who may be in different time zones)? ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Utilities
Thanks! That's it exactly! I was misunderstanding the concept of a utility with the name ''. On Mon, 2006-06-05 at 17:34 +0300, Albertas Agejevas wrote: > On Mon, Jun 05, 2006 at 09:22:13AM -0500, David Johnson wrote: > > > > > getUtility does not require a name. > > > > I've tried getUtility() without a name it never returns an interface and > > returns component lookup error. > > Because you haven't registered a single utility with the given > interface and name ''! > > > I've tried in many different instances, > > and I've ended up reverting as a work around to > > getAllRegisteredUtilitiesFor(), which works just fine. > > getAllRegisteredUtilitiesFor returns even the utilities that are > "overriden" by closer utilities with the same name and interface. > > > Once I add the name it works great. What am I missing? Is there > > some other requirement? My code looks the same as what you've > > listed. > > I suspect you expect getUtility(ISomething) to return a utility with > *any* name of that interface (that's what > get(AllRegistered)UtilitiesFor() does). But getUtility(ISomething) > returns just the utilities with the name you've passed ('' by default). > > I think I already explained that in my previous email. > > Albertas > ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Utilities
> getUtility does not require a name. I've tried getUtility() without a name it never returns an interface and returns component lookup error. I've tried in many different instances, and I've ended up reverting as a work around to getAllRegisteredUtilitiesFor(), which works just fine. Once I add the name it works great. What am I missing? Is there some other requirement? My code looks the same as what you've listed. The documentation implies that it does not need a name. Is this a possible Zope 3 version issue or bug? ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Utilities
What is the best to find the nearest utility without using a name? zapi.getUtility() seems to require a name (though the documentation implies otherwise). zapi.getAllRegisiteredUtilitiesFor() works but it seems to me if you have lots of utilities in other contexts, it would query those as well, and thereby be slow in a large application. I come across this problem frequently and haven't figured out the best way to deal with it. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Cut + Paste Bug?
Thanks. That's exactly what I ended up doing! On Thu, 2006-06-01 at 09:58 -0400, Stephan Richter wrote: > On Monday 15 May 2006 16:15, David Johnson wrote: > > I copied a Pluggable Authentication Utlity from one folder to another. > > However, the plugins were not copied. As a result, I cannot edit the > > copied utility. Now I'm stuck with a broken pluggable authentication > > utility. If I try to edit it to fix it, I cannot. > > > > 1. Is this a bug? > > Yeah, it is a bug. Pluggable Authentication utilities should probably have > their own ObjectCopier/ObjectMover implementation. > > > 2. How do I remove the broken utility? > > Good question. During development I would say, delete the Data.fs file. In my > experience I have learned that all of your app setup should be described in > Python anyways. ;-) > > Regards, > Stephan ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Call a Python method from a ZPT
The format is the same. Do you have more details? Are you getting errors? I've used this to embed variables to pass to an SQL database for example. On Mon, 2006-05-29 at 19:49 +0200, Paolo Cilmo wrote: > Hi, i have to call a method of a package from a ZPT. > In Zope2, i make the Poll Product (Dev_Guide 2_4). In the example i > can call "getVotesFor" method simply writing in ZPT (in ZMI) this > line: > > > > and it works > > In Zope3, i made the same product (package). From a ZPT page (in ZMI), > i can call a method of Poll if the method don't take arguments, for > example with: > > > > where poll1 is an istance of Poll package and it is in the same folder > of the ZPT page. This works because the method don't take arguments, i > just wan't call a method with parameters in Zope3, writing something > like: > > > > Please help me. > Thanks > > > > > Chiacchiera con i tuoi amici in tempo reale! > http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com > > ___ > Zope3-users mailing list > Zope3-users@zope.org > http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Calling PageTemplate in Content object
I have discovered the issue on this one, it seems that calling a method retrieved via "getattr" supresses output and exceptions. On Thu, 2006-05-25 at 12:37 -0500, David Johnson wrote: > I was able to duplicate the example from zope.pagetemplate.readme.txt. > > However I still have 2 problems: > 1. I receive no debugging or exception output when there are problems > 2. I cannot figure out how to call context or viewlet objects. > > Obviously Zope/Python is ignoring exceptions for me in certain > circumstances. Why? > > > > > ___ > Zope3-users mailing list > Zope3-users@zope.org > http://mail.zope.org/mailman/listinfo/zope3-users > ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Namespace/Viewlets
Ah ha! You've discovered it. I was not inheriting from BrowserView. Thanks! On Sat, 2006-05-27 at 19:36 +0300, Marius Gedminas wrote: > On Fri, May 26, 2006 at 10:54:46PM -0500, David Johnson wrote: > > I have a viewlet named "cart", which can be displayed with the following > > TAL code and rendered via : > > > > > is indistinguishable from > > class FooView(BrowserView): > index = ViewPageTemplateFile("foo.pt") > > def __call__(self): > return self.index() > > so if viewlets work in one case, they should work in the other as well. > > If your ViewPageTemplateFile is not a class attribute, the descriptor > magic does not happen and it does not know what view it belongs to. > In that case this should be the correct usage: > > class FooView(BrowserView): > > def __call__(self): > template = ViewPageTemplateFile("foo.pt") > return template(self) > > Big Fat Disclaimer: I'm writing from memory and could be completely > wrong. > > Marius Gedminas > ___ > Zope3-users mailing list > Zope3-users@zope.org > http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Namespace/Viewlets
I have a viewlet named "cart", which can be displayed with the following TAL code and rendered via : http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: How to make content object return a view?
Thanks! You are right. After a re-read of your book last night, I think my problem is that I have not understood or dealt with adapters as of yet. It seems that is the proper solution to expressing content in the way I intended and seems to solve all my problems in this area. -- David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Calling PageTemplate in Content object
I was able to duplicate the example from zope.pagetemplate.readme.txt. However I still have 2 problems: 1. I receive no debugging or exception output when there are problems 2. I cannot figure out how to call context or viewlet objects. Obviously Zope/Python is ignoring exceptions for me in certain circumstances. Why? ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] How to make content object return a view?
I have a content object, that I want to return a view. How is this done? This situation seems to come up frequently for me. What do you do? In this case, the content object is a fax. The fax will include browser views as part of it's body. I tried zapi.getView(), but this has been deprecated, and I don't quite understand the best approach. -- David Johnson ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] Calling PageTemplate in Content object
I still wonder why calling PageTemplate does not always render output or not give errors. That's the strangest part. At least with errors the problem would be diagnosible. I will try the "options/" format to see if I have any success. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Calling PageTemplate in Content object
I'm trying to call a page template in a content object, but nothing seems to happen. No exceptions, no output, and no errors. I figure I'm missing something. Anyone have ideas? ... from zope.pagetemplate.pagetemplatefile import PageTemplateFile class OrderView: def city(self): return 'Fort Worth' class ProcessStep(StepFactory): implements(IProcessStep) orderform = PageTemplateFile('orderform.pt') def message(self,request): return self.orderform(self,order=OrderView()) ... orderform.pt ... My City Is: ... >>> step.message(request) >>> *** Note how nothing is returned - no exceptions and no output. Thanks in advance. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] How to distribute distinct components among multiple Zope servers?
The other solutions presented thus far sound great. Obviously the devil is in the details, but in our situation, we have found using an SQL storage engine to be most useful. It does no do RPC per se, but we have found we can "wakeup" the other side to do something using a simple http call or trigger or queue. We examined J2EE and high end transaction systems and found they had many more cons (overhead, maintenance, training, speed, learning) than pros. Since the objects on the different systems might view the content in different ways, SQL tends to be more flexible. We simply created different object types that access the SQL and present it in an appropriate manner to that system. When creating a large system distributed system, reporting is also important, and SQL combined with Zope does wonders. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Cut + Paste Bug?
I copied a Pluggable Authentication Utlity from one folder to another. However, the plugins were not copied. As a result, I cannot edit the copied utility. Now I'm stuck with a broken pluggable authentication utility. If I try to edit it to fix it, I cannot. 1. Is this a bug? 2. How do I remove the broken utility? ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] Composing content objects
The problem appears to lie here: >File > "C:\develop\ZopeWorkspace\ZopeProducts\src\proCoders\interfaces.py", > line 23, in IWorkspace > value_type=Object(title=u"Object",description=u"adsf"), Hard to tell what's going on without the code, but poke around there. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] Composing content objects
The exact traceback would be useful. Can you post it? > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of Achim Domma > Sent: Saturday, May 13, 2006 5:30 AM > To: zope3-users@zope.org > Subject: [Zope3-Users] Composing content objects > > Hi, > > thanks to Phillips book and the help from this list, I managed to write > some usable content objects, to implement some views and to skin this > views. Now I have a new problem: > > I have implemented IArticle, IArticleFolder, IProject and > IProjectFolder. IArticle and IProject are simple content interfaces > which work so far. The folder interfaces are simply derived from > IFolder. They have constraints, so that only the correct types can be > inserted. > > Now I try to implement IWorkspace, which should have a property > 'projects' being an IProjectFolder instance and a property 'articles' > being an IArticleFolder. > > My current version looks like this: > > class IWorkspace(Interface): > title = TextLine( > title=u"Title", > description=u"The title", > default=u"Workspace", > required=True) > > projects = Dict( > key_type=Id(title=u"ID",description=u"xxx"), > value_type=Object(title=u"Object",description=u"xxx"), > title=u"Projects", > description=u"Projects in this workspace") > > articles = Dict(...) > > When I try to start Zope, I get the following error message: > > ZopeXMLConfigurationError: File "C:\...\configure.zcml", line 3.4-3.100 >TypeError: __init__() takes exactly 2 non-keyword arguments (1 given) > > The matching line in configure.zcml looks like this: > > type="zope.app.content.interfaces.IContentType" /> > > I have no problem reading code, but I don't know how to figure out which > __init__ causes the error. Neither Dict, nor Id or Object seem to have a > __init__ which might cause this message!? > > Can somebody enlighten me? Am I thinking in the wrong direction? Is > there a better way to combine content objects? Any hint is very welcome? > > regards, > Achim > ___ > Zope3-users mailing list > Zope3-users@zope.org > http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] rdb permission
How are permissions determined in rdb connections? I have added a rdb entry to my overrides.zcml problem, and it seems to picking up a “zope.ManageContent” security. I’m not sure why, how, or where. My anonymous users cannot access it therefore. What am I doing wrong? -- David Johnson ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] Add and Edit form
The addform directive should do as you desire. You mentioned you wanted to jump the an edit form directly upon adding instead of going to the contents view. This is what addform was designed to do. If my understanding is correct, can you send along the zcml snippets? From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Smith Sent: Friday, May 12, 2006 10:41 AM To: Zope3-users@zope.org Subject: Re: [Zope3-Users] Add and Edit form I am a little unclear into which object I should add the nextURL method. In myclass/browser/configure.zcml I have addMenuItem and addForm directives. I have tried adding the nextURL method to the class specified in the 'class' parameter of the addForm directive. That does not work. Stephan replied that the zope.app.form classes is where to override the nextURL method, but where do I fit a zope.app.form instance into my configuration? Thanks, John Cliff Ford <[EMAIL PROTECTED]> wrote: This is an example mextURL function that I used to add a folder containing a page, and then go to the folder. Going to the page is just an addition to the last line. HTH Cliff def nextURL(self): """ This function is called for redirection after folder creation. We can use it to fill out metadata collected from a custom add form. """ Yahoo! Cars NEW - sell your car and browse thousands of new and used cars online search now ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Security between Context and View
I have a view object which calls it’s content object to return another object. The view object does not have access to the returned object, and I receive a forbidden attribute error. ***Content*** class Transaction(object): transid=u’’ class TransactionFactory(Persistent,Contained): implements(ITransactionFactory) def produceTransaction(self): transaction = Transaction() transaction.transid = ‘abcd’ return transaction ***View*** class Transaction: def doTransaction(self): transaction = self.context.produceTransaction() self.session[‘transid’] = transaction.transid transaction.commit() This generates a forbidden attribute error on transaction.Transaction.transid -- David Johnson ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] Skinning in Zope 3.3
Both of the Zope 3 developer's books explain this quite well. I think Phillip's has the shortest example. Skins are one of the few Zope 3 concepts I was able to implement quickly. All sources will assume that you understand TAL, and METAL. You can download the source from either book either of the Zope 3 SVN or the worldcookery site. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of Achim Domma > Sent: Thursday, May 11, 2006 4:04 AM > To: zope3-users@zope.org > Subject: [Zope3-Users] Skinning in Zope 3.3 > > Hi, > > I try to understand how to customize the look & feel of my page using > the new skin/layer implementation of version 3.3. I followed the example > on > http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/SimplifyS > kinning > but still don't understand on how to change the layout of my page. > > Could somebody provide a short hint on how to override > @@standard_macros/page for the ShanghaiSkin in the example above? > > regards, > Achim > ___ > Zope3-users mailing list > Zope3-users@zope.org > http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] SQL Database Bug?
I figured this one out. Auto commit on the database is not on. I’m assuming the Zope or Python mysql driver or a database driver somewhere has set the default of auto commit to off. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Johnson Sent: Tuesday, May 09, 2006 11:40 AM To: 'user-list zope' Subject: [Zope3-Users] SQL Database Bug? The following code seems to be buggy somehow, but I’m not clear how or why. It seems for some reason that the first SQL “insert” query I run does not get processed, while the second one does. I’ve tried numerous variations on this with no success. I’ve done inserts before without problems. # The transaction ID “dj3” already exists in all cases, so both queryForResults calls should # throw an exception, however only the second, third, fourth do. query = "insert into transactions (transid) values ('dj3')" print query queryForResults(self.db,query) queryForResults(self.db,query) queryForResults(self.db,query) queryForResults(self.db,query) Generates: DatabaseException: (1062, "Duplicate entry 'dj3' for key 1") -- David Johnson [EMAIL PROTECTED] 201 Main Street Suite 1320 Fort Worth, TX 76102 (877) 572-8324 x2200 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] SQL Database Bug?
The following code seems to be buggy somehow, but I’m not clear how or why. It seems for some reason that the first SQL “insert” query I run does not get processed, while the second one does. I’ve tried numerous variations on this with no success. I’ve done inserts before without problems. # The transaction ID “dj3” already exists in all cases, so both queryForResults calls should # throw an exception, however only the second, third, fourth do. query = "insert into transactions (transid) values ('dj3')" print query queryForResults(self.db,query) queryForResults(self.db,query) queryForResults(self.db,query) queryForResults(self.db,query) Generates: DatabaseException: (1062, "Duplicate entry 'dj3' for key 1") -- David Johnson [EMAIL PROTECTED] 201 Main Street Suite 1320 Fort Worth, TX 76102 (877) 572-8324 x2200 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Internationalization, Widgets, and Currency
I am trying to implement a currency input using a Float widget. However, the widget is populated with a strange character, and when saving the data that strange character causes problems. I do not see a Currency widget. What is the proper internationalization technique in regards to currency and widgets? If I just use the float widget without the locale, the numbers are displayed without the trailing zeros that are standard, although it otherwise works fine. For example, US $1.20 is displayed as 1.2. -- David Johnson [EMAIL PROTECTED] 201 Main Street Suite 1320 Fort Worth, TX 76102 (877) 572-8324 x2200 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] formlib validators
Has anyone used formlib validators? What is the proper technique? I do not seem to be having any success. Here is a validator that I wrote that seems to do nothing (the success method is not called, and the form is redisplayed without errors). Basically it looks like the validator is being executed, but that it is not returning the proper format for errors. What is the proper way to generate a validation error? def checkFields(self,action,data): self.getFormFields() errs = self.validate(None,data) if len(errs) > 0 : return errs errs = [] if self.context.isRegistered(self.login): print "Login in use" err = WidgetInputError('login',u'Login',LoginInUse()) errs.append(err) return errs -- David Johnson [EMAIL PROTECTED] 201 Main Street Suite 1320 Fort Worth, TX 76102 (877) 572-8324 x2200 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] development workflow
I'm somewhat of a novice myself and big PHP fan, and I've found the tests just as slow as restarting, and they don't always cover everything the way I expect (although I think this may be due to my ignorance). I spend a lot of time in ZCML and they don't do so well there. I think it is good practice to write tests, but I've not worked up enough expertise to use them effectively, and they therefore impede my development; I suspect my opinion will change in time as I get more proficient. I have found that you can edit page templates without restarting, which helps tremendously. The restart process for me is about 5 seconds, so it's not that bad. I've developed a tremendous amount of code with Zope 3 in the last 3 months and my process is then: 1. write code 2. restart zope 3. repeat > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of Jachin Rupe > Sent: Wednesday, April 26, 2006 2:00 PM > To: zope3-users@zope.org > Subject: [Zope3-Users] development workflow > > hi there > > I'm new to Zope development from the PHP realm. When I worked in PHP > I would, write a little code, save it, refresh the browser and see > what happened. > > Initially I tried to do that in Zope and as you can imagine I decided > very quickly that having to restart Zope after I made every change > and then waiting for it to restart was just not going to work. > > (bunny trail: I've got a 1.67 ghz G4 PowerBook with 1 gig of Ram, is > " root Startup time: 32.328 sec real, 16.860 sec CPU" about where I > should be or am I doing something terribly wrong if it's taking me > that long to start zope?) > > After some reading it sounds like the way to go with Zope is to just > write lots of those "tests", which run much much quicker. So my > development processes looks something like this: > > 1. write code > 2. write tests > 3. run tests > 4 debug > 5. repeat steps 1-4 until there's a whole bunch of new features and I > can't stand not trying them out. > 6. restart zope and try things out. > > Is that how Zope 3 development is supposed to work? > > Right now I'm concerned about what will happen when I start testing > the security and the design (skin). My guess is there are mechanisms > to write tests to try out the the security settings but if I makes > design changes I obviously can't look at those via the command line. > Am I going to have to restart zope every-time I tweak something and > want to see how my changes look? Are there good tools and techniques > that will make the "skinning" of zope easier and faster? > > thanks > > -jachin > ___ > Zope3-users mailing list > Zope3-users@zope.org > http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Oracle Adapter
I’ve not seen any posts or information on this recently. Does anyone if there is an Oracle database adapter available? -- David Johnson ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] debian installation
I figured it out. An admin installed a different version and overrode Debian. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of David Johnson > Sent: Wednesday, April 26, 2006 10:21 AM > To: 'Stéphane Brault'; 'user-list zope' > Subject: RE: [Zope3-Users] debian installation > > This conversation must have jinxed me, because now I cannot install > python2.4-dev. Does anyone know a good apt source for the python2.4-dev > package? Ours depends upon python2.4 (=2.4.1-2), while the current > version of python is 2.4.2, and so we cannot install. > > Our apt list is: > deb http://ftp.us.debian.org/debian/ stable main contrib non-free > deb http://non-us.debian.org/debian-non-US/ stable/non-US main contrib > non-free > deb http://debian.yorku.ca/debian/ stable main contrib non-free > deb-src http://mirrors.usc.edu/pub/linux/distributions/debian/ stable main > deb http://security.debian.org/ stable/updates main contrib non-free > > > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > On Behalf Of Stéphane Brault > > Sent: Tuesday, April 25, 2006 7:01 AM > > To: user-list zope > > Subject: Re : [Zope3-Users] debian installation > > > > Thanks Andrius, > > it now works. > > > > Stéphane > > > > > > - Message d'origine > > De : Andrius Armonas <[EMAIL PROTECTED]> > > À : Stéphane Brault <[EMAIL PROTECTED]> > > Cc : user-list zope > > Envoyé le : Lundi, 24 Avril 2006, 10h55mn 23s > > Objet : Re: [Zope3-Users] debian installation > > > > Hi, > > > > you have to install python2.4-dev package. > > > > -- > > Andrius > > > > > > Stéphane Brault wrote: > > > > > Hi, > > > I'm trying to install zope on a debian distribution. ./configure > works > > ok, then when I invoke make > > > I get : > > > /usr/bin/python2.4 install.py -q build > > > error: invalid Python installation: unable to open > > /usr/lib/python2.4/config/Makefile (No such file or directory) > > > make: *** [build] Error 1 > > > I then create a config directory and copy Makefile in it. > > > I relaunch make and get: > > > /usr/bin/python2.4 install.py -q build > > > Traceback (most recent call last): > > >File "install.py", line 29, in ? > > > context.setup() > > >File "/home/Zope-3.2.0/Support/zpkgsetup/setup.py", line 132, in > > setup > > > setup(**kwargs) > > >File "/usr/lib/python2.4/distutils/core.py", line 149, in setup > > > dist.run_commands() > > >File "/usr/lib/python2.4/distutils/dist.py", line 946, in > > run_commands > > > self.run_command(cmd) > > >File "/usr/lib/python2.4/distutils/dist.py", line 966, in > run_command > > > cmd_obj.run() > > >File "/usr/lib/python2.4/distutils/command/build.py", line 112, in > > run > > > self.run_command(cmd_name) > > >File "/usr/lib/python2.4/distutils/cmd.py", line 333, in > run_command > > > self.distribution.run_command(command) > > >File "/usr/lib/python2.4/distutils/dist.py", line 966, in > run_command > > > cmd_obj.run() > > >File "/home/Zope-3.2.0/Support/zpkgsetup/build_ext.py", line 24, in > > run > > > distutils.command.build_ext.build_ext.run(self) > > >File "/usr/lib/python2.4/distutils/command/build_ext.py", line 254, > > in run > > > customize_compiler(self.compiler) > > >File "/usr/lib/python2.4/distutils/sysconfig.py", line 161, in > > customize_compiler > > > cpp = cc + " -E" # not always > > > TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' > > > make: *** [build] Error 1 > > > > > > Any hint ? > > > Thanks, > > > > > > Stéphane > > > > > > > > > ___ > > > Zope3-users mailing list > > > Zope3-users@zope.org > > > http://mail.zope.org/mailman/listinfo/zope3-users > > > > > > > > > > ___ > > Zope3-users mailing list > > Zope3-users@zope.org > > http://mail.zope.org/mailman/listinfo/zope3-users > > ___ > Zope3-users mailing list > Zope3-users@zope.org > http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] debian installation
This conversation must have jinxed me, because now I cannot install python2.4-dev. Does anyone know a good apt source for the python2.4-dev package? Ours depends upon python2.4 (=2.4.1-2), while the current version of python is 2.4.2, and so we cannot install. Our apt list is: deb http://ftp.us.debian.org/debian/ stable main contrib non-free deb http://non-us.debian.org/debian-non-US/ stable/non-US main contrib non-free deb http://debian.yorku.ca/debian/ stable main contrib non-free deb-src http://mirrors.usc.edu/pub/linux/distributions/debian/ stable main deb http://security.debian.org/ stable/updates main contrib non-free > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of Stéphane Brault > Sent: Tuesday, April 25, 2006 7:01 AM > To: user-list zope > Subject: Re : [Zope3-Users] debian installation > > Thanks Andrius, > it now works. > > Stéphane > > > - Message d'origine > De : Andrius Armonas <[EMAIL PROTECTED]> > À : Stéphane Brault <[EMAIL PROTECTED]> > Cc : user-list zope > Envoyé le : Lundi, 24 Avril 2006, 10h55mn 23s > Objet : Re: [Zope3-Users] debian installation > > Hi, > > you have to install python2.4-dev package. > > -- > Andrius > > > Stéphane Brault wrote: > > > Hi, > > I'm trying to install zope on a debian distribution. ./configure works > ok, then when I invoke make > > I get : > > /usr/bin/python2.4 install.py -q build > > error: invalid Python installation: unable to open > /usr/lib/python2.4/config/Makefile (No such file or directory) > > make: *** [build] Error 1 > > I then create a config directory and copy Makefile in it. > > I relaunch make and get: > > /usr/bin/python2.4 install.py -q build > > Traceback (most recent call last): > >File "install.py", line 29, in ? > > context.setup() > >File "/home/Zope-3.2.0/Support/zpkgsetup/setup.py", line 132, in > setup > > setup(**kwargs) > >File "/usr/lib/python2.4/distutils/core.py", line 149, in setup > > dist.run_commands() > >File "/usr/lib/python2.4/distutils/dist.py", line 946, in > run_commands > > self.run_command(cmd) > >File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > > cmd_obj.run() > >File "/usr/lib/python2.4/distutils/command/build.py", line 112, in > run > > self.run_command(cmd_name) > >File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command > > self.distribution.run_command(command) > >File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > > cmd_obj.run() > >File "/home/Zope-3.2.0/Support/zpkgsetup/build_ext.py", line 24, in > run > > distutils.command.build_ext.build_ext.run(self) > >File "/usr/lib/python2.4/distutils/command/build_ext.py", line 254, > in run > > customize_compiler(self.compiler) > >File "/usr/lib/python2.4/distutils/sysconfig.py", line 161, in > customize_compiler > > cpp = cc + " -E" # not always > > TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' > > make: *** [build] Error 1 > > > > Any hint ? > > Thanks, > > > > Stéphane > > > > > > ___ > > Zope3-users mailing list > > Zope3-users@zope.org > > http://mail.zope.org/mailman/listinfo/zope3-users > > > > > ___ > Zope3-users mailing list > Zope3-users@zope.org > http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
RE: [Zope3-Users] debian installation
I've installed on Debian many times and I don't remember these troubles with Sarge. I used Debian Python2.4. I suspect some python troubles here, but I'm not python expert. I do the install using: 1. cd Zope-3.2.0 2. ./configure --with-python /usr/bin/python2.4 3. make > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of Stéphane Brault > Sent: Monday, April 24, 2006 12:49 PM > To: user-list zope > Subject: [Zope3-Users] debian installation > > Hi, > I'm trying to install zope on a debian distribution. ./configure works > ok, then when I invoke make > I get : > /usr/bin/python2.4 install.py -q build > error: invalid Python installation: unable to open > /usr/lib/python2.4/config/Makefile (No such file or directory) > make: *** [build] Error 1 > I then create a config directory and copy Makefile in it. > I relaunch make and get: > /usr/bin/python2.4 install.py -q build > Traceback (most recent call last): >File "install.py", line 29, in ? > context.setup() >File "/home/Zope-3.2.0/Support/zpkgsetup/setup.py", line 132, in setup > setup(**kwargs) >File "/usr/lib/python2.4/distutils/core.py", line 149, in setup > dist.run_commands() >File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands > self.run_command(cmd) >File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > cmd_obj.run() >File "/usr/lib/python2.4/distutils/command/build.py", line 112, in run > self.run_command(cmd_name) >File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command > self.distribution.run_command(command) >File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > cmd_obj.run() >File "/home/Zope-3.2.0/Support/zpkgsetup/build_ext.py", line 24, in run > distutils.command.build_ext.build_ext.run(self) >File "/usr/lib/python2.4/distutils/command/build_ext.py", line 254, in > run > customize_compiler(self.compiler) >File "/usr/lib/python2.4/distutils/sysconfig.py", line 161, in > customize_compiler > cpp = cc + " -E" # not always > TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' > make: *** [build] Error 1 > > Any hint ? > Thanks, > > Stéphane > > > ___ > Zope3-users mailing list > Zope3-users@zope.org > http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] formlib validator
I’m using formlib and trying to implement a validator on a new-use sign up form. It seems to work unless I provide my own widget errors. Below is my validator. The code is being executed (I can see my debug code). Any ideas? What am I not understanding? The form simply returns with no validation errors at all. def checkFields(self,action,data): self.getFormFields() errs = self.validate(None,data) if len(errs) > 0 : return errs errs = [] if self.principalsource.has_key(self.login): print "Login in use" err = WidgetInputError('login','E-Mail','Already registered') errs.append(err) return errs -- David Johnson ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users