Re: [Zope3-Users] complete newbe question
On Monday 20 June 2005 13:30, smok wrote: When one opens //localhost:8080/ then comes this standard screen with all objects listed with some additional information, through which one can browse and display etc. If there is a skin defined at the top one can see for ex. worldcookery logo. I can create my own add, edit pages for every object, but I cannot for the main one. You have to write a custom contents.html view for IFolder. There are a couple more views like that for a folder and they are registered via the browser:containerViews directive. So how can I do this? And going further, how would I be able to access all defined objects from main page (how can I make on my own what now is automatic). I don't understand what you mean by access all defined objects from main page. You need to be more specific. 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] Complex views implementes in Python
On Monday 20 June 2005 11:39, Nicolas Legault wrote: After examining the worldcookery PDF example, I see how to implement the generation of the image, what I don't understant is how to include this in an HTML with a form and pass these value to the graph function. A long time ago I've implemented a web page like this in 100% pure code and what I've done was: - Examine the GET/POST to get passed parameter. - used default value for blank parameter. - create the graph and write it on a temporary name on HD. - construct the HTML returned code with a img src=... pointing to the graph - return the code to the remote browser. You want to write two views. One that displays the graph and the form and another that generates the graph. There are several options here: 1. You have a custom content object that stores the configuration from the HTML. During image generation, you simply use the data. 2. The HTML data is simply encoded in the image source URL and is used by the image generating view: img src=.../graph.jpg?x-axis-max=20... / 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] pluggable authentication utility
On Saturday 18 June 2005 13:36, Garrett Smith wrote: For 3.2, we need to find a way to make this clearer. Either we need to provide a more verbose description of what the name is for or perhaps, as Stephan has suggested, for components that are always looked up without names, we should not provide the option of entering a name and, for others, we should require a name. IMO, the PAU pattern of not taking a name works well. The confusion above may be a hold-over from the time when PAU regs did accept names. Right. In my opinion all nameless utilities are what services used to be. I have not yet seen an exception to this rule. The terminology I introduced for them in the new Tools UI (now called Site Management) is Unique Utilities, since they are unique to a given site. 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] Skin permissions: viewing wiithout login?
On Wednesday 15 June 2005 12:42, [EMAIL PROTECTED] wrote: After implementing my own skin, I get the request to log on (as manager), while visiting a normal site page. I do not have my zcml's at hand right now. Maybe somebody has an idea of what trap I walked into. I have no clue what could have gone wrong. But try to make your permissions zope.View too. 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 a multicheckboxwidget instead of a multiselectsetwidget
On Wednesday 08 June 2005 10:43, Jan-Wijbrand Kolman wrote: In mywidgets.py: from zope.app.form.browser import MultiCheckBoxWidget as MultiCheckBoxWidget_ def MultiCheckBoxWidget(field, request): vocabulary = field.value_type.vocabulary return MultiCheckBoxWidget_(field, vocabulary, request) In the configure.zcml: addform name=add_foo label=Add Foo schema=.interfaces.IFoo fields=filetypes content_factory=.foo.Foo template=foo.pt permission=zope.Public widget field=filetypes class=.mywidgets.MultiCheckBoxWidget / /addform Probably there're better ways to do this...? No, this is a good solution and should be incorporated into zope.app.form somehow. 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] Announcement - jsonserver 1.0 alpha, JSON-RPC for Zope3
On Monday 06 June 2005 17:16, Jim Washington wrote: Announcing: jsonserver 1.0 alpha. The code is at subversion repository: http://brigadoon.hill-street.net/svn/repos/jsonserver . Username 'anonymous' with blank password has read-only access. Congratulations, though I know its late! :-) There might be some interest in the Z3-ECM community of a JSON server. BTW, I have also deicded that I will tackle the HTTPRequestFactory issue for 3.2 by developing some sort of registry based on subscribers that decides based on registered subscribers which request to create. This way all you need to do is to register a new subscriber to hook up a new HTTP extension. Maybe I make it a utility, 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] suppress menu item with zcml?
Dylan Reinhardt wrote: Is there a simple/correct way to suppress a menu item using ZCML? For example, I have a content type that implements IAttributeAnnotatable and I want to suppress display of the Metadata tab in zmi_views. I expected this would work: menuItem for=foo.interfaces.IFoo menu=zmi_views title=Metadata action=EditMetaData.html filter=python:0 / __ This is the normal way to do it yes. When my content interface *inherits* from an interface, this seems to work... but when my class *implements* an interface, this appears not to. I don't know what you mean. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] suppress menu item with zcml?
Stephan Richter wrote: On Tuesday 21 June 2005 13:57, Dylan Reinhardt wrote: When my content interface *inherits* from an interface, this seems to work... but when my class *implements* an interface, this appears not to. That seems strange and would be a deep adapter-registry problem, most likely. If you can reproduce this problem in a simple/contained test, please add an issue for it. What is the correct way to do what I'm trying to do? The simplest way would be to comment it out. That doesn't work if the configuration is not yours. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Announcement - jsonserver 1.0 alpha, JSON-RPC for Zope3
Stephan Richter wrote: Congratulations, though I know its late! :-) There might be some interest in the Z3-ECM community of a JSON server. I would hope there would be interest in Z3-ECM. JSON's almost-python notation is very fast to read and write, and particularly so with minjson.py, which is part of the project. Of course, JSON(-RPC) only transports text-ish things; images and such need a different transport, I think. And I probably should have been a bit more explanatory on a couple of things in my announcement: 1. Since it is in my svn repository, and still alpha, it will change (presumably improve) as I see fit. If anyone sees anything that needs improving, let me know; I'm still enthusiastic about the project, so updates can happen quickly. In fact, I just did a minor update. Debug info now uses the logging facility instead of simply printing on the console :) . I'll wait until I hear positive things from anyone needing unicode (still a nagging worry) with it before I make a beta announcement. 2. My subversion repository is http only: svn co http://brigadoon.hill-street.net/svn/repos/jsonserver/trunk jsonserver will work OK. I did not bother poking another hole in the firewall for svn:// 3. minjson.py (also updated an hour or so ago) seems to work OK in pythons 2.3 and 2.4 4. If there's interest, I could probably put together and include a simple demonstration application. I am open for suggestions on what that app might be. BTW, I have also deicded that I will tackle the HTTPRequestFactory issue for 3.2 by developing some sort of registry based on subscribers that decides based on registered subscribers which request to create. This way all you need to do is to register a new subscriber to hook up a new HTTP extension. Maybe I make it a utility, I don't know. :-) Thanks, Stephan. That sounds appropriate. It seemed unpythonic to duplicate the code for all content-type listeners to add one content-type listener. Regards, -Jim Washington ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] suppress menu item with zcml?
On 6/23/05, Jim Fulton [EMAIL PROTECTED] wrote: Dylan Reinhardt wrote: When my content interface *inherits* from an interface, this seems to work... but when my class *implements* an interface, this appears not to. I don't know what you mean. Perhaps I'm not using the correct terminology. :-) Here are the two cases: Case 1 (implements): -- I have a ZCML directive such as this: content class=.mycode.MyClass implements interface=zope.app.annotation.interfaces.IAttributeAnnotatable / !--much snipped-- /content Case 2 (inherits). --- I use the following in my interface definition: from something.interfaces import ISomeBase class IMyClass(ISomeBase): this interface inherits from another one In case 2, I'm able to use the menuitem ZCML directive to suppress a menu that's defined by ISomeBase. All good. In case 1, I can't find a way to suppress the display of the Metadata tab at least not without resorting to a custom template or wrapping/modifying built-in code. This *seems* like a task for ZCML, yes? Does that help clarify the problem I'm seeing? Thanks, Dylan ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] suppress menu item with zcml?
Dylan Reinhardt wrote: On 6/23/05, Jim Fulton [EMAIL PROTECTED] wrote: Dylan Reinhardt wrote: When my content interface *inherits* from an interface, this seems to work... but when my class *implements* an interface, this appears not to. I don't know what you mean. Perhaps I'm not using the correct terminology. :-) Here are the two cases: Case 1 (implements): -- I have a ZCML directive such as this: content class=.mycode.MyClass implements interface=zope.app.annotation.interfaces.IAttributeAnnotatable / !--much snipped-- /content Case 2 (inherits). --- I use the following in my interface definition: from something.interfaces import ISomeBase class IMyClass(ISomeBase): this interface inherits from another one In case 2, I'm able to use the menuitem ZCML directive to suppress a menu that's defined by ISomeBase. All good. In case 1, I can't find a way to suppress the display of the Metadata tab at least not without resorting to a custom template or wrapping/modifying built-in code. This *seems* like a task for ZCML, yes? Does that help clarify the problem I'm seeing? I think so. So, you don't want to define a new interface that extends IAttributeAnnotatable. You should be able to define the menu item for the class. If you can't I'd consider that a bug. (This bug is not unlikely, because we may not have gotten around to supporting classes in menu-item for attriutes.) Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Zope 3.1.0 Zope3 Developer's Book
On Thursday 23 June 2005 04:19 am, Stephan Richter wrote: On Saturday 18 June 2005 16:08, Corey wrote: Maybe I can be of some help by going through the book using the new 3.1b and make notes of whatever stuff ( code and/or text ) that could be changed to better reflect the changes from 3.0 to 3.1. That would be great! The first task would be though to merge the SAMS edit work to the master TeX document. I can provide you with the Word files from SAMS and give you access to the book repository, which is located in a special repository on zope.org. Sounds great; I'll be able to devote real, actual, time to this. I went and emailed Jim a signed and scanned copy of the Contributor Agreement, so hopefully I'll be recieving an svn account soon. Cheers, Corey ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] woah... zcml O.D.
Thanks everyone for your responses - they were very informative. I feel I've got much better insight on the subject now, it's great to watch how the patterns begin to emerge and become recognizable - moments of aha!. ( as an aside: I have to say - the condition of the codebase, the organization of the APIs and the quality of the documentation is absolutely beautiful - well done! It quickly becomes very clear how much thought and effort went into the whole framework. ) Cheers, Corey On Wednesday 22 June 2005 11:32 pm, Corey wrote: Appologies if some of these questions seem naive, I'm just beginning to more thoroughly delve into zope3 - of which I've been very impressed so far. However - is it just me, or does zope3 seem to require a rather massive amount of configuration? ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users