Re: [Zope3-Users] records converter
Andrius Armonas wrote: Dmitry Vasiliev wrote: Maybe we need some converters simplification so for example we can get rid of some unused converters? I use :records converter rarely, but when I do it is extremely good thing (especially when building very complex views). It would be pitty if it has gone from zope3. It's pitty it doesn't work as it should now. The records works as expected, the difference was only in the representation which I've just fixed on the trunk at revision 66109. You can also check zope.publisher.tests.test_browserrequest.BrowserTests for some examples. If you still think the records doesn't work as expected please fill a bug report at http://www.zope.org/Collectors/Collectors/Zope3-dev. -- Dmitry Vasiliev (dima at hlabs.spb.ru) http://hlabs.spb.ru ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Grants to unathenticatedPrincipal
Hi, On Sat, Mar 18, 2006 at 10:32:39AM +, Rupert Redington wrote: When I try to make a permission or role based grant to zope.anybody through zcml I fail with: File /home/rupert/Zope3/lib/python/zope/app/security/principal.py, line 50, in checkPrincipal raise ValueError(Undefined principal id, principal_id) zope.configuration.config.ConfigurationExecutionError: exceptions.ValueError: ('Undefined principal id', 'zope.anybody') But the principal is defined in principals.zcml... If I try to overrride 'zope.anybody' by declaring my own unauthenticatedPrincipal in overrides.zcml my grant fails in a similar manner. Is it possible to make grants to the unauthenticatedPrincipal? Yes. What am I missing this time? You most probably tried to grant before defining the principal. Have a look at etc/site.zcml - securitypolicy.zcml is processed before principals.zcml . Placing your 'grant' somewhere behind those two includes should work. Regards, Frank ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] PyWebOff
On Friday 03 March 2006 02:27, Shane Hathaway wrote: I've been assigned to present Zope in a local upcoming Python user group meeting. As part of the assignment, I'm supposed to solve the PyWebOff challenge using Zope: http://pyre.third-bit.com/pyweb/challenge.html I'd like to do this using Zope 3. However, I'm really struggling. I feel like I must be using Zope 3 in a really dumb way, because the code so far is highly repetitive, completely dependent on Zope, and more XML than Python. This is not going to go over well in the presentation. Can anyone tell me how to do this better with Zope 3? Maybe my Zope 2 experience is preventing me from seeing something obvious. I've attached the __init__.py and configure.zcml that I created in a package called challenge. The problem here is that this challenge does some very standard things. It does not require real programming. Thus you end up with more ZCML than you might think. In my experience with SchoolTool, I learned that I spend for more time developing Python (and developing doctests for that code) than writing ZCML. As you have probably seen from the recent discussions, Zope 3 does not scale down well. I think once the new AGX is done (which will support Zope 3), then this task will be a matter of developing a UML model. Sorry, but I do not have a better answer. 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] Creating XML using Pagetemplates doesn't work
On Wednesday 01 March 2006 11:22, Frank Burkhardt wrote: Hi, I wrote a view that returns a Atom-document (comparable to RSS). The content type is 'application/atom+xml'. Unfortunately the pagetemplate inserts some strings containing german umlauts (non-ascii) and I get this error: Honestly, the content type declaration sucks, but I know, you cannot do anything about that. :-( ValueError: Unicode results must have a text content type. I found this line in zope.publisher.http: if not content_type.startswith('text/'): raise ValueError( [...] which explains everything. Yep. I tried to insert the umlauts in HTML notation (e.g. '#xfc;') but zope outsmarted me and escaped the '' :-( . My Question is: What is the best way (tm) to handle that? There are two solutions to the problem: 1. Write your own request/response object; I think someone has done that already. 2. Instead of returning a string, return an IResult object. Then the indicated piece of code will be ignored. 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 3 and web services
On Monday 13 February 2006 16:43, Dilley, Hara wrote: Is there any recent documentation available for soap and web services in general using python 2.4.2 and zope 3 I don't know about documentation, but the SOAP package can be found here: http://svn.zope.org/soap/trunk/ There is a short, but complete README.txt file there: http://svn.zope.org/soap/trunk/README.txt?rev=29014view=auto The package has recently been updated to work with Zope 3.2. 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] LDAP Authentication
On Monday 20 February 2006 23:24, Deborah Pollard wrote: I have installed, configured, registered, named and activated ldapadapter with Public permission. Ditto for ldappas. Both are svn revision 41715. Both pass their tests. There are no errors when Zope 3.2.0 restarts. Everything looks fine, but Zope ignores LDAP and uses (or tries to use) Basic Authentication. There seems to be a step missing somewhere, but where? How do I get Zope 3 to authenticate with LDAP? First of all, HTTP basic authentication has nothing to do with LDAP at all. Now to your real problem. Installing ldappas (which should really be renamed, sigh) is simply not enough. You still have to go to your local site and create a pluggable authentication utility (PAU). In it you can configure your authentication methods and the authentication data source, which would be your LDAP connection. 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] child is not cataloged while adding parent
On Friday 03 March 2006 02:46, [EMAIL PROTECTED] wrote: and I've made an export/import view for that folder, where I succceeded to catalog children. basically both uses the same code. simply like: parent[u'the name of the child'] = Child() What I'm missing for? It'd be happy to hear anything you tell me. You are doing nothing incorrectly. The system cannot magically know about all the sub-objects to index. It is you responsibility as programmer to tell the system how to step through the children and add them to the indices. So you are on the right track! :-) 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] Newbie question...
On Saturday 04 March 2006 10:01, Thierry FLORAC wrote: - define editform in browser's configure.zcml = probably bad ! If the for attribute differs from the schema attribute in the edit form, the form will automatically look up an adapter from the context object (implementing the for interface) to the interface specified in schema. 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] doctest w/ formlib and ViewPageTemplateFile
On Saturday 04 March 2006 11:37, Shaun Cutts wrote: I notice that (.).namespace/view is somewhere registered as an adapter for ITraversable. Is this what I need? Is there a convenience function somewhere to setup this and/or any other adapters I need to get ZPT running for doctests? Or how should I be doing my setup? PlacefulSetup does a lot for you but not everything. You have to investigate which particular traversal adapter is missing and register it in your setup by hand. In your case this seems to be the namespace traversal adapters. Setting up doctests to render HTML is certainly not trivial, see for example SchoolTool's setup code: http://source.schooltool.org/viewcvs/trunk/schooltool/src/schooltool/app/browser/testing.py?rev=5827view=auto 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] forbiddenAttribute on frozenset?!
On Monday 06 March 2006 00:41, Shaun Cutts wrote: I hope I don't have to declare permissions built in classes?!? Yes you do. We have no security declarations on frozenset in the Zope 3 code. I think this has been discussed on zope3-dev, but I am not sure whether security declarations were added to the trunk. You should certainly check the trunk code and the issue collector and file a bug report, if this has not been done. 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: Zope 3 Developer's LiveBook
On Tuesday 07 March 2006 01:41, Paul Dumais wrote: I have familiarized myself with docbook and am gung ho. I am fairly new to zope3, so I will not be much help with content. I will be good at trying out things and keeping the document up to date. Using docbook is probably okay for most people,, not for me though. ;-) I decided to go with darcs for now, we can move to svn if darcs doesn't work for most people. I have a repo at z3book.unstate.ca. You can do: darcs get http://z3book.unstate.ca; to get the book (but there's nothing there!). I think this is a very high entry bar, since pretty much everyone in Zope 3 land uses svn. Also, you should explain how people willing to help can get access to the box. For now I am hoping to get suggestoins on how the book should be laid out. What about something like: preface Basic Usage Framework Overview Common Development Patterns Content Components I really have no clue. I was hoping that a zope3 guru could suggest how the parts could be best laid out. It seems to me that it is very tricky to have an encyclopedic resource for power users as well as easy to follow trails for newbies who are likely to get lost in the woods. I think by looking at the two existing books, you could come up with an initial outline. For those of you who have already authored tutorials, books, articles, tips, etc. It would be most excellent if you could offer them up (permission to use and alter, etc). Icing on the cake would be if you could suggest where in the zope 3 book you envision seeing your info. A cherry on top would be if you could update the information for the current release. I think you should also announce the effort to a wider audience, i.e. zope3-dev, zope, and zope-announce. 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] Principal annotations
On Wednesday 08 March 2006 03:32, Shane Hathaway wrote: Chapter 27 of the Zope 3 book and the docstring for IPrincipal in Zope 3.2 both suggest Zope has the ability to provide a browser view of principal annotations. That would be a really great bit of functionality to have! Unfortunately, AFAICT, the system doesn't work at all in Zope 3.2. The Zope 3 book says you have to create an Authentication Service, but no such thing exists anymore. Unfortunately, this is correct. The PAS is gone. It was one of those bits in the book that I knew would be a problem with Zope 3.1, but could do nothing about. :-( Instead, I created Pluggable Authentication Utility and put a principal folder inside it. But principals created this way are InternalPrincipal objects which do not implement IPrincipal, so they don't have the extra view I registered. I could find no other way to visit a user object in the management interface. Therefore, views of IPrincipal are currently never used. Okay. IPrincipal is used though. The strategy changed from PAS to PAU. In PAS a principal always existed, once you created it. In PAU, only information about the principal is stored and the principal (providing IPrincipal) is created once the authentication was successful. Was this an accident? Did it work at one time? Are there plans to make principal annotation views work again? And how can I edit user annotations in the meanwhile? The principal annotation views (can you actually give me some names?) could be easily fixed by working with IPrincipalInfo objects instead IPrincipal objects. This step should not be too hard. 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] Problem with SetIndex (from zc.catalog)
On Wednesday 15 March 2006 17:45, Thierry FLORAC wrote: TraversalError: (zc.catalog.catalogindex.SetIndex object at 0xb46bfd2c, 'documentCount') documentCount seems to be defined into the SetIndex class, so I don't understand this error... Well, by default attributes are not traversable, so that the following does not work: object/attrname But this should work: object/++attribute++attrname SchoolTool has developed a clever dynamic Traversal mechanism that allows you to do the first case: http://source.schooltool.org/viewcvs/trunk/schooltool/src/schooltool/traverser/ 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] export\import content
On Sunday 19 March 2006 13:57, Garanin Michael wrote: I have not empty Folder on computer. How can i import Folder to other computer? Where is analog of Zope2 import\export (zexp)? Currently we have no equivalent. :-( Though I think zexp could be ported. 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] Database access problem from form support Class
On Wednesday 08 March 2006 16:17, Cliff Ford wrote: However, it would be helpful to know whether calling the database adapter utility directly has hidden implications - the thread safety field of IManageableZopeDatabaseAdapter returned 0 (Threads may not share the module) and I don't know what to do about it, if anything. No, there should not be any implications. That thread module sharing is turned off might be a lack of a feature from the mysql module? I don't know. 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] giving back: montisite
On Friday 17 March 2006 02:49, Cliff Ford wrote: In the spirit of giving back to the community that has supported me I am making available a package, named montisite, that I have been working on whilst learning how to use Zope 3. I think it might be helpful to other newcomers who need examples just to take apart to see how they work. To that end I intend to provide more and better documentation to help other newcomers. The current version is functional but a bit rough inside. I have to go away for a few days so it will have to do for now. You can get the package and see example screen grabs at: This is great! Thanks for your work. I think a lot of people are interested to see how skinning is done. 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] New way of using skins
On Wednesday 08 March 2006 11:40, Florian Lindner wrote: layer=CS.skin.interfaces.ICentershockLayer seems to work but do I always have to give the lenghty python path?? I think I already pointed out on zope3-dev that this is what philiKON decided to do. I personally do not think this was such a great move, even though in SchoolTool we already used the Python paths for a long time. 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] Grants to unathenticatedPrincipal[Resolved]
Frank Burkhardt wrote: Hi, On Sat, Mar 18, 2006 at 10:32:39AM +, Rupert Redington wrote: When I try to make a permission or role based grant to zope.anybody through zcml I fail with: File /home/rupert/Zope3/lib/python/zope/app/security/principal.py, line 50, in checkPrincipal raise ValueError(Undefined principal id, principal_id) zope.configuration.config.ConfigurationExecutionError: exceptions.ValueError: ('Undefined principal id', 'zope.anybody') But the principal is defined in principals.zcml... If I try to overrride 'zope.anybody' by declaring my own unauthenticatedPrincipal in overrides.zcml my grant fails in a similar manner. Is it possible to make grants to the unauthenticatedPrincipal? Yes. What am I missing this time? You most probably tried to grant before defining the principal. Have a look at etc/site.zcml - securitypolicy.zcml is processed before principals.zcml . Placing your 'grant' somewhere behind those two includes should work. Regards, Frank Thanks Frank, That was it indeed... Rupert ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] PyWebOff
On 03.03.2006, at 08:27, Shane Hathaway wrote: Hello, I've been assigned to present Zope in a local upcoming Python user group meeting. As part of the assignment, I'm supposed to solve the PyWebOff challenge using Zope: http://pyre.third-bit.com/pyweb/challenge.html I'd like to do this using Zope 3. However, I'm really struggling. I feel like I must be using Zope 3 in a really dumb way, because the code so far is highly repetitive, completely dependent on Zope, and more XML than Python. This is not going to go over well in the presentation. Can anyone tell me how to do this better with Zope 3? Maybe my Zope 2 experience is preventing me from seeing something obvious. I've attached the __init__.py and configure.zcml that I created in a package called challenge. Shane from zope.interface import Interface, implements from zope.schema import Field, TextLine, Int, Date from zope.app.container.interfaces import IContained, IContainer from zope.app.container.constraints import ItemTypePrecondition from zope.app.container.constraints import ContainerTypesConstraint from zope.app.container.btree import BTreeContainer class IBook(Interface): title = TextLine(title=u'title') year = Int(title=u'year') authors = TextLine(title=u'authors') class ILoan(Interface): username = TextLine(title=u'username') day = Date(title=u'day') class ILibrary(IContainer): def __setitem__(name, object): pass __setitem__.precondition = ItemTypePrecondition(IBook, ILoan) class IBookContained(IContained): __parent__ = Field( constraint = ContainerTypesConstraint(ILibrary)) class ILoanContained(IContained): __parent__ = Field( constraint = ContainerTypesConstraint(ILibrary)) class Book(object): implements(IBook, IBookContained) class Loan(object): implements(ILoan, ILoanContained) class Library(BTreeContainer): implements(ILibrary) if you use v 3.2 then you should use from zope.app.container.constraints import contains, containers instead of the precondition stuff, so you don't need that ...Contained interfaces, because you can define the interfaces as strings well, this just reduces the python code, but looks much cleaner e.g. class IBook(IContained): title = TextLine(title=u'title') year = Int(title=u'year') authors = TextLine(title=u'authors') containers('challange.interfaces.ILibrary') ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] PyWebOff
Argh. Darn that user group meeting being down in Utah Valley. Don't they consider the fact that there may be Utahn's who still try to cling to a car-free urban lifestyle notion (especially when they live and work on the same block)? :) Tell them to come up by my house. Terrific restaurants, delis, italian markets, etc. Some of the best Thai food in the city... Anyways, it's too late to help you for the user group meeting in question, but I'd like to take this on as a personal little challenge, seeing if I can come up with a more interesting and pleasing to the Python developer solution. Maybe you can show it next month as an alternate option? On 3/3/06, Shane Hathaway [EMAIL PROTECTED] wrote: Hello, I've been assigned to present Zope in a local upcoming Python user group meeting. As part of the assignment, I'm supposed to solve the PyWebOff challenge using Zope: http://pyre.third-bit.com/pyweb/challenge.html I'd like to do this using Zope 3. However, I'm really struggling. I feel like I must be using Zope 3 in a really dumb way, because the code so far is highly repetitive, completely dependent on Zope, and more XML than Python. This is not going to go over well in the presentation. Can anyone tell me how to do this better with Zope 3? Maybe my Zope 2 experience is preventing me from seeing something obvious. I've attached the __init__.py and configure.zcml that I created in a package called challenge. Shane configure xmlns=http://namespaces.zope.org/zope; xmlns:browser=http://namespaces.zope.org/browser; content class=.Book require permission=zope.View interface=.IBook / require permission=zope.ManageContent set_schema=.IBook / /content content class=.Loan require permission=zope.ManageContent interface=.ILoan / require permission=zope.ManageContent set_schema=.ILoan / /content content class=.Library require permission=zope.ManageContent interface=.ILibrary / require permission=zope.ManageContent set_schema=.ILibrary / /content browser:addform name=addlibrary schema=.ILibrary content_factory=.Library permission=zope.ManageContent / browser:addMenuItem class=.Library permission=zope.ManageContent view=addlibrary title=Library / browser:containerViews for=.ILibrary index=zope.View contents=zope.View add=zope.ManageContent / browser:addform name=addbook schema=.IBook content_factory=.Book permission=zope.ManageContent / browser:addMenuItem class=.Book permission=zope.ManageContent view=addbook title=Book / browser:editform schema=.IBook permission=zope.ManageContent menu=zmi_views title=Edit name=edit / browser:addform name=addloan schema=.ILoan content_factory=.Loan permission=zope.ManageContent / browser:addMenuItem class=.Loan permission=zope.ManageContent view=addloan title=Loan / browser:editform schema=.ILoan permission=zope.ManageContent menu=zmi_views title=Edit name=edit / /configure ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Jeff Shell ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] PyWebOff
Jeff Shell wrote: Argh. Darn that user group meeting being down in Utah Valley. Don't they consider the fact that there may be Utahn's who still try to cling to a car-free urban lifestyle notion (especially when they live and work on the same block)? :) Tell them to come up by my house. Terrific restaurants, delis, italian markets, etc. Some of the best Thai food in the city... Well, as for me and a couple other regular attendees, the meeting is about 50 feet away from work. ;-) Anyways, it's too late to help you for the user group meeting in question, but I'd like to take this on as a personal little challenge, seeing if I can come up with a more interesting and pleasing to the Python developer solution. Maybe you can show it next month as an alternate option? I would be happy to present your solution. I think they'd be happy to see it, too. Shane ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: Principal annotations
Stephan Richter wrote: [ ... ] Was this an accident? Did it work at one time? Are there plans to make principal annotation views work again? And how can I edit user annotations in the meanwhile? The principal annotation views (can you actually give me some names?) could be easily fixed by working with IPrincipalInfo objects instead IPrincipal objects. This step should not be too hard. Yes, that would work, but it'd mean that annotations will only work for PrincipalFolder authentication... is there a way to provide a , for example contact view, providing telephone, email, etc. and attach it to all principals regardless of wether they are principalfolder- or ldap-authenticated? regards, luis ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problem with SetIndex (from zc.catalog)
On Mon, 2006-03-20 at 10:16 -0500, Stephan Richter wrote: On Wednesday 15 March 2006 17:45, Thierry FLORAC wrote: TraversalError: (zc.catalog.catalogindex.SetIndex object at 0xb46bfd2c, 'documentCount') documentCount seems to be defined into the SetIndex class, so I don't understand this error... Well, by default attributes are not traversable, so that the following does not work: object/attrname But this should work: object/++attribute++attrname SchoolTool has developed a clever dynamic Traversal mechanism that allows you to do the first case: http://source.schooltool.org/viewcvs/trunk/schooltool/src/schooltool/traverser/ But I'm just trying to use a simple (not subclassed) SetIndex, and then to access my catalog Advanced management page...! I don't build any specific template for this. Should I build any specific SetIndex subclass ? Or define a specific template ?? Thanks, Thierry -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problem with SetIndex (from zc.catalog)
On Monday 20 March 2006 17:14, Thierry FLORAC wrote: Should I build any specific SetIndex subclass ? Or define a specific template ?? I think in this case it is a bug. Feel free to report it in the issue tracker. :-) 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: Principal annotations
On Monday 20 March 2006 16:11, luis wrote: The principal annotation views (can you actually give me some names?) could be easily fixed by working with IPrincipalInfo objects instead IPrincipal objects. This step should not be too hard. Yes, that would work, but it'd mean that annotations will only work for PrincipalFolder authentication... is there a way to provide a , for example contact view, providing telephone, email, etc. and attach it to all principals regardless of wether they are principalfolder- or ldap-authenticated? absolutely. SchoolTool has Person objects that are maintained in content space. You have several choices of connecting the person objects to the principal then. You could: (1) Keep track of the principal id in the Person object and then listen to ``PrincipalCreatedEvent``s to append the data. Note that the home folder is a good demo for that. (2) Write an adapter from IPrincipal to IPerson that does the data lookup for you. 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] Problem with SetIndex (from zc.catalog)
Thierry FLORAC wrote: Should I build any specific SetIndex subclass ? Or define a specific template ?? When I last used SetIndex from zc.catalog.index it didn't quite match the interface(s) required zope.app.catalog. It was simple enough to patch - which I can send you if you like. -Tom ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problem with SetIndex (from zc.catalog)
On Mar 20, 2006, at 5:32 PM, Stephan Richter wrote: On Monday 20 March 2006 17:14, Thierry FLORAC wrote: Should I build any specific SetIndex subclass ? Or define a specific template ?? I think in this case it is a bug. Feel free to report it in the issue tracker. :-) See email I just sent to Thierry. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Newbie question...
On Mon, 2006-03-20 at 09:45 -0500, Stephan Richter wrote: On Saturday 04 March 2006 10:01, Thierry FLORAC wrote: - define editform in browser's configure.zcml = probably bad ! If the for attribute differs from the schema attribute in the edit form, the form will automatically look up an adapter from the context object (implementing the for interface) to the interface specified in schema. I tried to add the for attribute to my configure.zcml editform statement, but the problem I described in several previous post (between march 04 and march 07) remains : - on first read access to the form, annotations (a PersistentDict) are correctly defined - if trying to set values, modifications seems to be applied, but in fact they are lost when refreshing the form (they are probably just extracted from request) and the adapter setters are not called (as seen if printing to standard output). Actually, the only working way I found to update my annotations through my adapters is always to use form directives with the help of a support class using getData/setData methods which call the adapter directly... Any idea ? Thierry -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problem with SetIndex (from zc.catalog)
On Mar 20, 2006, at 5:34 PM, Tom Dossis wrote: Thierry FLORAC wrote: Should I build any specific SetIndex subclass ? Or define a specific template ?? When I last used SetIndex from zc.catalog.index it didn't quite match the interface(s) required zope.app.catalog. It was simple enough to patch - which I can send you if you like. Use the ones in zc.catalog.catalogindex.py instead: they do the necessary mixing-in for zope.app.catalog friendliness, without a patch. Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Swiss Easter Sprint note
Hi Swiss Easter Sprinters, Sorry I don't have each email address right now, and hope to catch you via the zope3-dev and zope3-users mailing list. I setup a mailinglist at [EMAIL PROTECTED] Please subscribe yourself to the list. You can do this by sending a mail with the email address you like to subscribe with a additional body like: Subscribe sprint YOUR NAME You can also get a help mail with subscribe or unsubscribe information if you send a mail to [EMAIL PROTECTED] with the word help in the mail body. If you have problems, send me a note and I will add your email address for you. Please subscribe to this list because we will send additional information via this list and use it to schedule the sprint and we also start to discuss the sprint topics there. You are not a sprint participant? If you are interessted, feel free to add yourself to the list or drop me note if I can do it for you. -- Regards Roger Ineichen _ Projekt01 GmbH www.projekt01.ch Boesch 65 6331 Hünenberg phone +41 (0)41 781 01 78 mobile+41 (0)79 340 52 32 fax +41 (0)41 781 00 78 email [EMAIL PROTECTED] _ END OF MESSAGE ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problem with SetIndex (from zc.catalog)
Gary Poster wrote: On Mar 20, 2006, at 5:34 PM, Tom Dossis wrote: Thierry FLORAC wrote: Should I build any specific SetIndex subclass ? Or define a specific template ?? When I last used SetIndex from zc.catalog.index it didn't quite match the interface(s) required zope.app.catalog. It was simple enough to patch - which I can send you if you like. Use the ones in zc.catalog.catalogindex.py instead: they do the necessary mixing-in for zope.app.catalog friendliness, without a patch. Looks like I missed it - thank you. The purpose of the patch was to convert documentCount workCount to methods for the advanced view. I'll try it out. -Tom ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problem with SetIndex (from zc.catalog)
Tom Dossis wrote: Gary Poster wrote: Use the ones in zc.catalog.catalogindex.py instead: they do the necessary mixing-in for zope.app.catalog friendliness, without a patch. Looks like I missed it - thank you. The purpose of the patch was to convert documentCount workCount to methods for the advanced view. I'll try it out. Turns out I was using zc.catatlog.catalogindex.SetIndex and the patch was to convert the above attributes to methods. From memory they were showing up as repr's in the advanced catalog page. Maybe there was a way to achieve this via zcml? ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] worldcookery.browser.widget.DynamicSequenceWidget
Marco Mariani wrote: How should I modify the custom widget in the recipe examples to make it work with 3.2.0 ? As it is, the program does not work from chapter 7 onward I get this on zope.app.form.browser.SimpleInputWidget at every attempt to display the widget: instance = self._widget_factory(*args) TypeError: __init__() takes exactly 4 arguments (3 given) --- browser/widget.py.orig 2004-07-10 17:59:36.0 +0200 +++ browser/widget.py 2006-03-19 18:28:16.0 +0100 @@ -1,9 +1,9 @@ from zope.app import zapi from zope.app.form.interfaces import IInputWidget -from zope.app.form.browser.widget import SimpleInputWidget +from zope.app.form.browser.sequencewidget import SequenceWidget from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile -class DynamicSequenceWidget(SimpleInputWidget): +class DynamicSequenceWidget(SequenceWidget): Widget for (simple) sequences that does not require the form to be reloaded for every change. -- View this message in context: http://www.nabble.com/worldcookery.browser.widget.DynamicSequenceWidget-t1179980.html#a3504247 Sent from the Zope3 - users forum at Nabble.com. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problem with SetIndex (from zc.catalog)
On Mon, 2006-03-20 at 17:37 -0500, Gary Poster wrote: On Mar 20, 2006, at 5:14 PM, Thierry FLORAC wrote: But I'm just trying to use a simple (not subclassed) SetIndex, and then to access my catalog Advanced management page...! I don't build any specific template for this. Should I build any specific SetIndex subclass ? Or define a specific template ?? Thierry, try adding the following to zc.catalog's configure.zcml (this is for all four of the zope.app.catalog-aware indexes). content class=.catalogindex.ValueIndex require permission=zope.ManageServices interface=zope.app.catalog.interfaces.IAttributeIndex zope.index.interfaces.IStatistics set_schema=zope.app.catalog.interfaces.IAttributeIndex / /content content class=.catalogindex.SetIndex require permission=zope.ManageServices interface=zope.app.catalog.interfaces.IAttributeIndex zope.index.interfaces.IStatistics set_schema=zope.app.catalog.interfaces.IAttributeIndex / /content content class=.catalogindex.DateTimeValueIndex require permission=zope.ManageServices interface=zope.app.catalog.interfaces.IAttributeIndex zope.index.interfaces.IStatistics set_schema=zope.app.catalog.interfaces.IAttributeIndex / /content content class=.catalogindex.DateTimeSetIndex require permission=zope.ManageServices interface=zope.app.catalog.interfaces.IAttributeIndex zope.index.interfaces.IStatistics set_schema=zope.app.catalog.interfaces.IAttributeIndex / /content Then give it a try. (This only works if you are using the indexes I listed, but you probably get the idea.) If this helps, we should check it in. Modification is OK (at first, see below) for the first indexes, but an error is raised while starting Zope for the DateTime indexes, because class attribute points to a method name : zope.configuration.config.ConfigurationExecutionError: exceptions.TypeError: type_ must be a type, class or module, not a function DateTimeValueIndex at 0xb672510c in: File /usr/local/zope/3.2/var/lib/python/zc/catalog/configure.zcml, line 58.3-66.3 content class=.catalogindex.DateTimeValueIndex require permission=zope.ManageServices interface=zope.app.catalog.interfaces.IAttributeIndex zope.index.interfaces.IStatistics set_schema=zope.app.catalog.interfaces.IAttributeIndex / /content After removing this modification for the two last indexes, I can access catalog's advanced management screen without error, but information is not really fine : on a SetIndex for example, Document Count and Word Count columns are displayed as security proxied BTrees.Length.Length instance at 0xb4dc052c instead of their numeric values... Thierry -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Newbie question...
On Monday 20 March 2006 17:26, Thierry FLORAC wrote: Actually, the only working way I found to update my annotations through my adapters is always to use form directives with the help of a support class using getData/setData methods which call the adapter directly... Can you post the code again, the one that is not working? Note that a persistent dict is no good, since the form code tries to set an attribute and not a mapping item. 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] Problem with SetIndex (from zc.catalog)
Tom Dossis wrote: Tom Dossis wrote: Gary Poster wrote: Use the ones in zc.catalog.catalogindex.py instead: they do the necessary mixing-in for zope.app.catalog friendliness, without a patch. Looks like I missed it - thank you. The purpose of the patch was to convert documentCount workCount to methods for the advanced view. I'll try it out. Turns out I was using zc.catatlog.catalogindex.SetIndex and the patch was to convert the above attributes to methods. From memory they were showing up as repr's in the advanced catalog page. Maybe there was a way to achieve this via zcml? Ah-ha! No, sounds like I just misimplemented. I'll fix that up soon (unless you'd like to check in the fix with some small easy tests?) Thanks Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Announce: z3site - theme engine for Zope3-sites
Garanin Michael wrote: Hello! I publish simple theme-engine for Zope3-sites. I use it for customize GUI(and ZMI) of Zope3-sites through browser. It's dynamics skin and local utitlity for theme storage. Features: 1) you can change GUI of web-site (and ZMI) through web (on fly, without restart server, and without Zope3-programming) 2) you can prepare theme and upload as tar.gz archive. 3) you can create few themes for one site. Example: you can get design from www.oswd.org and create new ZMI through web (without create Zope3-skin and without restart server). url: http://www.zope.org/Members/garanin/z3site Hi, I'm getting this error. zope.configuration.xmlconfig.ZopeXMLConfigurationError: File /home/pradeep/three/etc/site.zcml, line 7.2-7.55 ZopeXMLConfigurationError: File /home/pradeep/three/etc/package-includes/z3site-configure.zcml, line 1.0-1.27 ZopeXMLConfigurationError: File /home/pradeep/three/lib/python/z3site/configure.zcml, line 27.2-27.33 ZopeXMLConfigurationError: File /home/pradeep/three/lib/python/z3site/browser.zcml, line 7.2-7.80 ConfigurationError: ('Invalid value for', 'layers', ImportError: Couldn't import zope.app.boston, No module named boston in z3site rotterdam zope.app.boston.boston default) I guess your product uses boston app. is this dependent on http://svn.zope.org/Zope3/branches/roger-bostonskin/ ? ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users