[Zope3-Users] SQLObject and SQLOS question
Hi! I am new both to Zope3 and SQLObject, but they seem (from the descriptions) to be natural fit. My problem is getting them work together. My goal: - seamlessly use sqlobjects for business logic in Zope3 (that is, part of the persistancy will be in MySQL db, part in ZODB). I want nice abstraction of relational DB in the form of sqlobject python objects. I have already installed: Python2.4.2 MySQLdb (to be sure) Zope3 (Zope 3.2b3 ) MySQLda addon SQLObject (to the proper Python2.4.2 of course) Now it looks like I need SQLOS (do I need it to my goal???)... And I am at loss how to install in. Yes, I have read http://codespeak.net/z3/sqlos/ but it was not useful, because it doesn have INSTALL instructions. The tgz doesnt have neither setup.py nor configure! Maybe I have not found proper manual... Can anybody help me please? One more question: is the above mentioned approach STABLE at all compared to totally ZODB or conventional usage of relational DB in Zope? Version 0.1 of sqlos is not reassuring... Thanks! Regards, Roman Suzi ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] problem Z3+cpsskins
On Saturday 31 December 2005 18:58, Hector Miuler Malpica Gallegos wrote: Hi friends, i have a problem actually use cpsskins of svn.z3lab.org and the zope3 of svn (svn.zope.org), whenever I want to create a subject shows the following error: You might have more luck asking on the z3-labs mailing list, since Jean-Marc is more active there. 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] SQLObject and SQLOS question
On Tuesday 03 January 2006 05:45, Roman Susi wrote: Now it looks like I need SQLOS (do I need it to my goal???)... Well, sqlos is one approach. It provides a nice layer that connects SQLObject and Zope 3. And I am at loss how to install in. Yes, I have read http://codespeak.net/z3/sqlos/ but it was not useful, because it doesn have INSTALL instructions. The tgz doesnt have neither setup.py nor configure! Maybe I have not found proper manual... Can anybody help me please? I don't know about sqlos, but packages are usually installed anywhere in the Python path. For example, if you have the SVN checkout, you should simply put http://codespeak.net/svn/z3/sqlos/trunk/src/sqlos/ into the Zope3/src directory and copy all files in http://codespeak.net/svn/z3/sqlos/trunk/includes/ intp Zope3/package-includes One more question: is the above mentioned approach STABLE at all compared to totally ZODB or conventional usage of relational DB in Zope? Version 0.1 of sqlos is not reassuring... This version of sqlos is used in production in a fairly large installation, so I think it is a pretty stable solution in that sense. On the other hand, not many people use sqlos, so it might not be as supported as you wish it would be. 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 Z3+cpsskins
Stephan Richter wrote: On Saturday 31 December 2005 18:58, Hector Miuler Malpica Gallegos wrote: Hi friends, i have a problem actually use cpsskins of svn.z3lab.org and the zope3 of svn (svn.zope.org), whenever I want to create a subject shows the following error: You might have more luck asking on the z3-labs mailing list, since Jean-Marc is more active there. Regards, Stephan I answered on the z3lab list already since I didn't want to cross-post. Very specific cpsskins questions are better asked there I think. http://lists.nuxeo.com/pipermail/z3lab/2006-January/000852.html Also I'm not sure if I have subscribed with different addresses on the different lists so I don't know if I can simply reply to all the lists at once (let's see..). Regards /JM ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] How hidden ZMI
On Wednesday 28 December 2005 04:10, 张平 wrote: I am newbie of zope, have installed zope3. I just want develop a web site use zope, not wanna dive into zope itself development. But when I add a bugtrack with the name of bugtrack, and visit it, the content of http://zope.host:8080/bugtrack include ZMI, how can I hidden them. You can't. But you can avoid showing it by making the bugtracker skin the default skin. Another option would be, of course, to develop your own skin from scratch. 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] Which packages to remove from etc/package-includes
On Sunday 25 December 2005 06:51, Douglas Douglas wrote: Is this issue important or there's no real difference in how many packages get included on start? You are right, the fewer ZCML files you read, the faster it starts. First of all, to have a more minimal set of files read, use the release, since it excludes several packages. If you do not need/want the developer's mode, then you can simply turn it off in zope.conf (saves 1 sec in starttime on my computer). After that you are on your own. I would simply remove one file at a time and see what happens (in fact, renaming the file prefix is sufficient). 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] Confused re Fine Distinction btw a View and a Page
On Wednesday 07 December 2005 07:01, Jeff Rush wrote: I'm trying to understand how a sequence of pages is handled, as one example the IAdding (+) view. I'm running into the TAL use of the terminology: @@standard_macros/page versus @@standard_macros/view Both of those have much of the Zope interface look, just that /page drops the tabbar (I wish there were an easy way to drop the tree and login name from /page too). To understand this properly, look at zope.app.basicskin.standardmacros. You can see that view and page are both really the page macro. However, ZPT stores the actual macro name in a variable macroname. You can then say, okay, if the macro page was requested, then I do not want to show the available views, context menus, etc. The usage of this feature can be seen in zope.app.rotterdam/template.pt But then in CMF, seemingly using view/page to mean something else, I have: browser:pages versus browser:view And in the source, we have: Named View w/o Pages Unnamed View w/Pages Named View w/Pages First of all, I think you meant to s/CMF/ZCML. Next, ZCML has **nothing** to do with TAL. In ZCML, browser:page and browser:view are ways to register new browser views. I agree that their existence is convoluted, as browser:pages duplicates a lot of the browser:view use cases. If you use browser:view, with pages, then you can do the following traversal: context/view1/page1.html context/view2/page2.html If you use browser:pages, then you can only do: context/page1.html cotnext/page2.html Obviously a page and a view are not the same thing, but something hierarchical. But is such a page still a view component or some appendage of a view? For adding items: +/index.html +/action.html Those are two real browser-pages, one for displaying the form to be filled in, and one for accepting that form and actually creating the item. And some benefit or sharing of data occurs by making those pages 'subviews' of the '+' view but I'm not sure what that benefit is, other than sharing a few ZCML directives. Well, we do not clutter the container namespace. Consider this. Let's take your suggestion and let's implement, adding-index.html and adding-action.html. The you could use: container/@@adding-index.html container/@@adding-action.html There are two disadvantages: (a) You always have to use @@, since the container could have objects called adding-*.html. (b) You have to use more English and it is not as obvious that those two views belong together. And last, in such a sequence of pages, there must be a way to control the final destination or page displayed after creating that instance. One Zope 3 book mentions providing a nextURL() method on the view, but in the case of '+' that would require subclassing. Is there a less intrusive way? Subclassing is fine in this case. You could write your own IAdding implementation that looks up an adapter for the nextURL call, but I think that would be an overkill. 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] My principals not being found by PrincipalRegistry
On Wednesday 30 November 2005 15:11, Alec Munro wrote: Specifically, this relates to the undo page. I have my own class of principal folder, as well as several classes of principals. These work for login, but when looking at the undo page, I get not available. Is there something I manually have to do in order to get my principals to be available in the PrincipalRegistry, or have I screwed up somewhere else? This seems strange to me. As long as you implemented all the interfaces correctly (specifically getting the principal's complete id), there should be nothing else required. I suggest looking into the undo code, make some PDB breakpoints and see where you loose the information. 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] (Ab)using utilities
On Tuesday 29 November 2005 18:16, Thomas Lotze wrote: Our current solution is to register utilities that handle type two and three items, and turn them into folders actually containing the items while we're at it. This does provide uniqueness of the type two and three item containers, as well as well-defined access by an interface name. However, I'm not at all sure that containing application data is what utilities are meant for. Is it? I get a feeling that we might want folders as attributes of the top-level container, for all the uniqueness and well-defined access that provides. But would that be Zope-3-ish? There are several approaches: (1) Use the catalog. I bet you can find a way to create an index by class name or by the content type interface. (2) Write a special folder that keeps track of all ids of type A, B, C... This is the cheap way of getting a catalog-like feature. (3) a derivation of (2) would be to write adapters that store the ids of type A, B, C in annotations. Use event subscribers to update the annotations. Overall, I agree with you that utilities are not meant to solve this type of problem for the reasons you listed 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] unauthenticated principal
On Sunday 27 November 2005 12:57, Florian Lindner wrote: my error log has a entry to a unauthenticated principal: unauthenticated, pre1, CS.User, beschreibung but why is there a username (pre1) being print? What does the unauthenticated means in that context? I have no clue. :-) Zope 3 has the concept of an unauthenticated user. This user can have as many roles or permission granted as you wish. Why the system thinks that pre1 is an unauthenticated user, beats me. BTW, where is that log entry coming from? 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] Add menu
On Wednesday 16 November 2005 06:31, [EMAIL PROTECTED] wrote: We're a little at loss because the Add menu disappeared from the pages, though, and we can't make out the logic behind its behaviour. Can you access the adding view manually? mycontainer/+/index.html If not, you need to register the adding views yourself, of course. I bet you then the add menu will reappear. 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] Renaming folder causes NotFoundError
On Monday 14 November 2005 16:00, John Smith wrote: Anyhow, I tried to rename the folder to something more descriptive, and Zope3 keeps coming up with the There has been a system error page, and on the terminal it say s NotFoundError, 'myfolder'. Sorry, that you had to wait that long for an answer, but does this error still occur in Zope 3.2b3? 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
[Zope3-Users] Problems with form package and widget
Hi! I'm tryng to create in Zope3 a "select tag" with this code: voc=SimpleVocabulary.fromValues(lst) repository_choice=Choice(title=u'Repository', vocabulary='voc') repository_list=List(__name__='replist', title=u'Repositories', description=u'The repositories', value_type=repository_choice) field = Int(__name__='numero', title=u'Nume ro', min=0, max=10) request = TestRequest(form={'repository_list.replist': u'9'}) widget = SelectWidget(repository_list, request) widget.hasInput() widget.getInputValue() a= widget().replace(' ', '\n ') print a n.b. lst is a generic list but it take this error: __init__() takes exactly 4 arguments (3 given) How i correct this code? And, where i can find a GOOD document for using widget? Zope3 book is very bad... Please help me Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] SQLObject and SQLOS question
Hello Roman, Have a look at http://codespeak.net/svn/z3/sqlos/trunk/doc/examples/sqlos_sample/ Tuesday, January 3, 2006, 11:45:57 AM, you wrote: Hi! I am new both to Zope3 and SQLObject, but they seem (from the descriptions) to be natural fit. My problem is getting them work together. My goal: - seamlessly use sqlobjects for business logic in Zope3 (that is, part of the persistancy will be in MySQL db, part in ZODB). I want nice abstraction of relational DB in the form of sqlobject python objects. I have already installed: Python2.4.2 MySQLdb (to be sure) Zope3 (Zope 3.2b3 ) MySQLda addon SQLObject (to the proper Python2.4.2 of course) Now it looks like I need SQLOS (do I need it to my goal???)... And I am at loss how to install in. Yes, I have read http://codespeak.net/z3/sqlos/ but it was not useful, because it doesn have INSTALL instructions. The tgz doesnt have neither setup.py nor configure! Maybe I have not found proper manual... Can anybody help me please? One more question: is the above mentioned approach STABLE at all compared to totally ZODB or conventional usage of relational DB in Zope? Version 0.1 of sqlos is not reassuring... Thanks! Regards, Roman Suzi ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Best regards, Adammailto:[EMAIL PROTECTED] -- Quote of the day: The universe is full of magical things patiently waiting for our wits to grow sharper. - Eden Phillpotts ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Search Results (was: How come no IView?)
On Sun, 2006-01-01 at 20:40 -0700, Jeff Shell wrote: [...] While ZCML's view and page directives will put BrowserView into your base classes automatically if it's not there, I prefer to still use it as a base class directly. It makes the code more readable (I can see that 'SearchResults' is a browser view immediately), and is just a good concept (I believe) in making your code more Pythonic and less dependent on you or other readers of it understanding the ZCML 'magic' that goes on in the browser declarations. Hi all, a bit of a different topic but Jeff mentioned above SearchResults and it got me thinking about the way I handle searching (search form and returning results) and it doesn't feel right. Basically I handle entering of ISearchFilter (just non-persistent search criteria fields), searching a catalog and returning of results in a single AddView form. As a result I have a single page template for this view and it is quite messy as it collects form input and displays search results. I would like to have two page views 1. ISearchFilter add view - collects search form fields and searches the catalog creating ISearchResults object 2. ISearchResults browser view of SearchResults object But I am having problems when navigating from the add view to ISearchResults browser view (tried to get the view using getMultiAdapter), maybe I should redirect to it? SearchResults object is created based on catalog search results but it is non-persistent and only lives in memory during a single transaction, how do I navigate to its browser view, what is its traversable path (or is locatable the right term)? Should I somehow register a factory for ISearchResults and use zapi.createObject() to create some sort of a context for the object? Or I might be completely missing the point. I think I am lacking in understanding of traversable, locatable concepts and if they can be of any relevance to non-persistent objects. Any explanation of this or pointers to documents I could read is much appreciated. Thanks Alen ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users