Re: [Zope3-Users] Required choice without default value in formlib
On Friday 12 January 2007 05:02, Thierry Florac wrote: I use formlib to handle my forms. In a AddForm, how can I have a required choice property, using a dynamic vocabulary, without a default selected value ? You would have to write your own widget that displays a blank value by default. If the blank value is not changed by the user to a real value, then the widget throws an error during validation. I think by mapping the blank value to the missing value willdo the trick, so the custom widget would be a simple extension to the existing one. 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] traceback on startup from a wsgi server
On Monday 08 January 2007 09:54, Michael Haubenwallner wrote: /home/user/Zope3/src/zope/configuration/config.py:690: DeprecationWarning: Change the site.zcml Replace: include package=zope.app / with: include package=zope.app.zcmlfiles / This will go away in Zope 3.6. actions = self.handler(context, **args) Test-module import failures: Try to fix this deprecation warning first. MAybe this solves your issue. 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] interview for my diploma thesis about Zope 3 in education
On Monday 22 January 2007 07:08, Dominique Lederer wrote: 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) I hope it is not too late. 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? Yes, like Java is taught because of it's object orientation, Zope 3 should be taught because of its component architecture. For me, the mental jump from object-oriented to component-oriented design is as big as the one from procedural to object-oriented programming. Further, I think that Zope 3 is a great tool for education, because it is the only Open Source software that embraces test-driven development. Zope 3 is a prime example of why automated tests are so important. In addition, the *.txt files are just beautiful examples of great technical writing and documentation. * How would you convince someone who is in charge to use Zope 3 in his curriculum? I think it would be a difficult sell. Zope 3 is, afterall, a Web application server. Only a small fraction of CS problems can be solved with a Web application. A programming language, on the other hand, can help solve a very wide range of problems. I think that Zope 3 as the full server only makes sense in a Web-development class. For general classes, I would only suggest libraries that illustrate very common patterns: zope.component, zope.interfaces, zope.event, zope.security, ... * 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? Zope 3 is CBSE. Well, in Python there is only one component architecture and this is zope.component. Other programming languages offer their own solutions. So the choice of the CA is largely based on your choice of programming language and your type of application. For example, CORBA would not fit the Web nicely. * How do you see the future of Zope? Where do you (want to) see it in 2 years? The largest probelm for Zope 3 is currently the rate of adoption. Another way of looking at it is to say that people need to come out of the closet. Other technologies tend to steal the show with a lot of hype, but Zope 3 is well equipped to stand up to them. I think a lot of people know that, but they are afraid to spread the word. We really need more case studies and project reports. In 2 years, I hope that Zope 3 has grown to an application framework that competes with the big Java bullies. I do not think that we should even compare ourselves to PHP, RoR, Turbogears or Django anymore. We should talk about why we think we are better and more productive than people with JBoss. This will require a bit of marketing effort and more non-coding committments by people in the community. 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] Containers Contains
On Sunday 28 January 2007 06:32, David Johnson wrote: 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? contains() and containers() 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] Get a site
On Sunday 28 January 2007 12:23, Florian Lindner wrote: exceptions.ValueError: I/O operation on closed file any idea what caused it? I think you violate the transaction mechanism. I think it would be easier to make a call via the publisher. 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] Vocabularly
On Sunday 28 January 2007 12:51, David Johnson wrote: def getFunctions(): values = [ 'Black', 'Red', 'Blue' ] return SimpleVocabulary.fromValues(values) This looks good. 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? Can you provide the schema and field code which uses the vocabulary? Nothing changed with respect to vocabularies, except that you have to create vocabulary factories explicitely now. 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] Wierd Error
On Monday 29 January 2007 16:15, David Johnson wrote: 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? Getting errors at this point is usually tricky to debug. Start the debugger just above the return and check out what meta and obj is. There is almost no way to help via a mailing list here, which is probably the reason no one has responded yet. 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] Timezones and zope.i18n.locale
On Friday 16 February 2007 02:48, FB wrote: AFAIK there's is no easy way of automatically determining a user's timezone. I have recently checked in a package called z3c.iplocation. It requires you to buy some data (there is a short version too), but if you really want it, it's worth it. 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] Using zope.component outside Zope 3-how to bootstrap the registries
On Friday 16 February 2007 08:15, Andreas Jung wrote: I am trying to use zope.component (Zope3 3.0) within a Python module (not running the whole Zope 3 boilerplate). I want to register a utility. What is the correct way to setup the registries (in particular the Utility registry) in order to register utilities? No need to setup any registries. Just use the zope.component API, for example: provideUtility() provideAdapter() 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] win32 setup
On Friday 02 February 2007 03:00, Ivan Horvath wrote: i've downloaded the latest zope version (http://www.zope.org/Products/Zope3/3.3.0/Zope-3.3.0.win32-py2.4.exe). how can i customize the installation path? because it is installed on the site_packages folder in python/lib folder. i would prefer to put the complete zope package in a different folder outside python, because in this way i can manage the update more precisely. I think in this case you are best off installing the source version and get the PYD zip file, so that you do not have to compile the extensions yourself. 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] zope.app.cache
On Thursday 01 February 2007 05:55, Martin Aspeli wrote: Any pointers? The only thing that I know is that zope.app.cache was effectively a copy of the Zope 2 code, so it behaves in similar fashion. I do not see why you could not make use of the package via Five, there is nothing magical there. Since the data for the RAMCache is stored ina module-global variable, there should be no trickery needed. 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] ImportError: type zope.app.boston.app.boston.* is unknown
On Saturday 03 March 2007 13:49, Myles English wrote: Can anyone please tell me what might be causing this error when I try to start zope? I used to be able to fix it temporarily by commenting out the parts of a browser.skin.configure.zcml but I have forgotten how and never understood why anyway. It looks like it is something to do with absolute and relative paths, maybe. I have looked for missing dots at the start of paths to packages and they are all there. I've recently tried to update the one skin I have as per http://kpug.zwiki.org/WhatIsNewInZope33 . Used to get the same message but with the rotterdam layer before I upgraded to the latest svn trunk but I can't remember how to fix it. (Damn). Something is really messed up with your setup. Such errors should not occur on a standard Zope 3 installation/checkout. 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] problems using os.popen2 in a heavily used utility
On Tuesday 30 January 2007 15:57, Shaar Gabriel wrote: i read somewhere that os.popen2 is not friendly towards twisted framework, and that twisted.internet.reactor.spawnProcess or twisted.internet.process.Process should be used. i can't undersnad what format the parameter childfds should look like when calling those. could somebody show me the equivalent of (stdin, stdout) = os.popen2() ? Why don't you use PIL? Then you do not need to create a new sub-process and do it all within your well-contained Python thread. 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] Doctests and authenticated principal
On Wednesday 31 January 2007 05:28, Maciej Wisniowski wrote: In doc test I may use: request = TestRequest() class User(object): ... id = 'Jan' ... title = 'Jan Kowalski' request.setPrincipal(User()) ..rest of the test.. and after this everything works. Is this correct way? Sure, whatever it takes to get it to work. :-) I also have some code that uses: from zope.app.security.interfaces import ILoginPassword ILoginPassword(self.request).getLogin() During tests, I always get None as result of the above statement. So another question, what is the correct way to get currently authenticated principal id: request.principal.id or ILoginPassword(self.request).getLogin()? I use request.principal.id. Note that principal.id != principal.login 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] Permission Question
On Wednesday 07 February 2007 10:23, FB wrote: I tried using security-annotations which worked fine for single users: ('user-xy','zope.ManageContent',Deny) ('user-owner','zope.ManageContent',Allow) However, this is rather impractical for 1000+ users - so I tried: ('zope.Everybody','zope.ManageContent',Deny) ('user-owner','zope.ManageContent',Allow) - didn't work :-( . What or who is zope.Everbody? Why aren't you using groups? That will solve your problem and is exactely the use case groups exist for. 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] formlib sequences
On Wednesday 14 February 2007 06:47, Dennis Schulz wrote: Generally it is hard or impossible to find UML stuff about Zope 3. And I also think that Zope 3 does not fit very good into the common patterns of UML. I agree. I also have an extremely hard time developing sequence and class diagrams for Zope 3 that are meaningful. Anyways, I would be happy about some comments and hints about mayor errors. I had a quick look through them and they look okay. 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] Change site-wide error logging behaviour
On Thursday 15 February 2007 20:21, Andrew Groom wrote: I need to change the default error logging behaviour to send me an email when there's an error. I'm guessing this involves adapting an interface in etc/overrides.zcml or something like that - has anyone done this before and, if so, is willing to share some code ? :-) Much appreciated. You can write a custom error reporting utility that sends out an E-mail every time a an error occurs. Alternatively, you could implement your own error views that send out events and have subscribers react to those events sending E-mails. There are plenty of choices. 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] Okay, i have a product, but now I want a website (2nd try)
On Saturday 17 February 2007 08:32, Robert-Reinder Nederhoed wrote: I would like to separate the website parts from the Mobile Home code, so I can start integrating other Zope3 products with the website. (like a blog) Somehow it seams difficult. You want to write your own skin from scratch. We usually do this is a separate package. So that you do not have to totally start at zero, we have provided the z3c.layer.minimal MinimalLayer, which gets you all the basic things, like widgets, error messages, etc. You can then start to register CSS and HTML on top of it. 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] z3c.ajax help
On Tuesday 06 March 2007 10:41, Ricardo Sixel wrote: Could anyone help me with z3c.ajax ? I cannot find neither instructions nor examples showing how to use or deploy it. In instance/src/z3c, do: svn co svn://svn.zope.org/repos/main/z3c.ajax/trunk/src/z3c/ajax . In instance/etc/package-includes, add a file called z3c.ajax-configure.zcml: include package=z3c.ajax / Restart Zope 3 and you should have it all setup. Since the package has no tests you are on your own after that. 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] Get a site
Am Donnerstag, 8. März 2007 20:10 schrieb Stephan Richter: On Sunday 28 January 2007 12:23, Florian Lindner wrote: exceptions.ValueError: I/O operation on closed file any idea what caused it? I think you violate the transaction mechanism. I think it would be easier to make a call via the publisher. The problem was that I forgot to close the connection, resp. called the close function on the wrong object. Regards, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: z3c.ajax help
Hi Stephan, I've bought Weitershausen's book, 2nd edition, and It's very straightforward. I'll try to use you hint as a starting point, developing it on my own. Thank you, Sixel Stephan Richter escreveu: On Tuesday 06 March 2007 10:41, Ricardo Sixel wrote: Could anyone help me with z3c.ajax ? I cannot find neither instructions nor examples showing how to use or deploy it. In instance/src/z3c, do: svn co svn://svn.zope.org/repos/main/z3c.ajax/trunk/src/z3c/ajax . In instance/etc/package-includes, add a file called z3c.ajax-configure.zcml: include package=z3c.ajax / Restart Zope 3 and you should have it all setup. Since the package has no tests you are on your own after that. Regards, Stephan ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] general zope question
I would like to build an application with Zope3 that does not use the ZODB at all. I want to pull my data from my own database, display it to the user and allow them to change and edit the values with forms. Is Zope the right solution for this situation? I know everyone says the ZODB is very powerful and I know forms are very easy to generate through widgets and formlibs, but I don't want to store my information via Zope. Sqlos is another solution I have heard of but I dont' want to use that either. Is it conceivable to build an application in Zope3 with an outside database and not use the ZM? -- Tyson Wenger Computer Programmer VL Tool,Inc. 2021 MacArthur Rd. Waukesha, WI 53188 (262)547-1226 x178 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] general zope question
On Thu, Mar 08, 2007 at 04:40:11PM -0600, tyson wrote: I would like to build an application with Zope3 that does not use the ZODB at all. (snip) Check the archives of the past month or two, there's been some recent discussion of this exact topic. -- Paul Winkler http://www.slinkp.com ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] FreeBSD zopectl socket.error: (13, 'Permission denied')
zope3-users: I am a FreeBSD 6.2 and Zope newbie who is attempting to get Zope 3.3.0 working. I have made and installed Zope 3 using the ports collection, and run mkzopeinstance. Everything seemed to go okay. When I try to use zopectl to start Zope, I get an error: 2007-03-08 18:52:21 [EMAIL PROTECTED] ~ # /usr/local/www/Zope3/bin/zopectl start zope . Traceback (most recent call last): File /usr/local/www/Zope3/lib/python/zdaemon/zdrun.py, line 719, in ? main() File /usr/local/www/Zope3/lib/python/zdaemon/zdrun.py, line 716, in main d.main(args) File /usr/local/www/Zope3/lib/python/zdaemon/zdrun.py, line 243, in main self.run() File /usr/local/www/Zope3/lib/python/zdaemon/zdrun.py, line 256, in run self.opensocket() File /usr/local/www/Zope3/lib/python/zdaemon/zdrun.py, line 278, in opensocket sock.bind(tempname) File string, line 1, in bind socket.error: (13, 'Permission denied') . . . . . . . If I try to browse to port 8080 on the host using IE 7, I get the following error page: Internet Explorer cannot display the webpage /usr/local/www/Zope3/log/z3.log is empty. I have tried stopping Apache, with no apparent effect. Any suggestions? TIA, David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users