[Zope-dev] can these wrong DEPENDENCIES.cfg files be removed?
We are working on zope.app.renderer and I see that there is a file named DEPENDENCIES.cfg that lists: docutils zope.app zope.component zope.configuration zope.interface zope.schema zope.structuredtext zope.testing while the actual package has a different list of dependencies: setuptools docutils zope.component zope.configuration zope.i18nmessageid zope.interface zope.publisher zope.schema zope.structuredtext [test] zope.app.testing What is the DEPENDENCIES.cfg file for, and why are the dependencies listed different than the current ones in setup.py? Can I just remove the redundant information in DEPENDENCIES.cfg and have the information in just one place instead? -- Brandon Craig Rhodes bran...@rhodesmill.org http://rhodesmill.org/brandon ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.component: calling an Interface and calling queryAdapter give differing results
Shane Hathaway [EMAIL PROTECTED] writes: Philipp von Weitershausen wrote: So overall I'm +1 +1 from me as well on IFoo.adapt() with the signature Chris suggested. zope.component.getMultiAdapter() is only easy to remember if you're a die-hard Zope coder, while IFoo.adapt() seems more useful to the larger Python community. A similar suggestion was hammered out last September; I guess September is the official month for the annual reconsideration of adaptation syntax? :-) http://mail.zope.org/pipermail/zope3-dev/2007-September/023824.html http://mail.zope.org/pipermail/zope3-dev/2007-September/023904.html http://mail.zope.org/pipermail/zope3-dev/2007-September/023907.html I'm encouraged by the fact that this time it looks like people with time are interested enough to actually begin producing code? At the time that I made the 2007 proposal I was still very new to the code base and never got the courage up (or time available) to start making changes... -- Brandon Craig Rhodes [EMAIL PROTECTED] http://rhodesmill.org/brandon ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] [zopeproject] ZODB3 specified, but ZODB3 3.9.0-dev-r77011 egg still attempted?!
Philipp von Weitershausen [EMAIL PROTECTED] writes: [versions] ZODB3 = 3.8.0 ... This didn't work, buildout still tries to install 3.9.0-dev-r77011. Why?! Because you're not doing it right. You invented a [versions] section but you still need to tell buildout to actually use that section as a versions declarations: [buildout] ... versions = versions Should we write something like Grok for buildout, so that it just uses sections without having to have them doubly declared up at the top? :-) -- Brandon Craig Rhodes [EMAIL PROTECTED] http://rhodesmill.org/brandon ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: could zope.sqlalchemy flush before committing?
Laurence Rowe [EMAIL PROTECTED] writes: This is now fixed in trunk. For the moment I'm depending on SQLAlchemy trunk for the new after_attach hook until beta3 is released. Could the fix be backported and a new release made? I have to have this particular system ready for production next week, and would love to not have to explain why it was running out of Subversion in production. :-) -- Brandon Craig Rhodes [EMAIL PROTECTED] http://rhodesmill.org/brandon ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] could zope.sqlalchemy flush before committing?
I complained recently about problems with things disappearing from an in-memory sqlite database. It appears that my problems were actually symptoms of something else: that, so far as I can see, doing a transaction.commit() when SQLAlchemy is active does *not* first do a session().commit()! This means that the following sequence in a test suite: p = Person(name='Brandon') s = session() s.add(p) transaction.commit() s.attribute = 'an illegal value' Traceback: ... Exception: the database does not allow that attribute to have that value transaction.rollback() Instead, to make this work, one has to write the first stanza as: p = Person(name='Brandon') s = session() s.add(p) s.flush() # Sheesh transaction.commit() Could zope.sqlalchemy be improved so that, on transaction commit, the current SQLAlchemy session is first flushed before being committed? -- Brandon Craig Rhodes [EMAIL PROTECTED] http://rhodesmill.org/brandon ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: could zope.sqlalchemy flush before committing?
Brandon Craig Rhodes [EMAIL PROTECTED] writes: I complained recently about problems with things disappearing from an in-memory sqlite database. It appears that my problems were actually symptoms of something else: that, so far as I can see, doing a transaction.commit() when SQLAlchemy is active does *not* first do a session().commit()! Drat. I meant, as I hope the code examples that followed made clear, that doing a transaction.commit() does not do a session().flush(). -- Brandon Craig Rhodes [EMAIL PROTECTED] http://rhodesmill.org/brandon ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Repoze-dev] repoze.bfg
Malthe Borch [EMAIL PROTECTED] writes: On Vudo, the view is always a layout. It's then up to the layout to provide regions in which you can plug in a region content provider. Typically, you'd plug in at least the following: -- Title provider: Renders the title of the page (in title/title) -- Content provider: Renders the content of the page as widgets There are many more options to this scheme. You could plug in a portlet manager, or a viewlet manager or a global navigation. Someone mentioned Vudo to me last week. I said that I was tempted to write an extension to Grok that lets you create a grok.Layout template that maybe is inherited throughout your whole site if you don't specify otherwise, and then a grok.View on an object would just generate content for the main pane inside of that layout, and viewlets could keep working like they do today but fill in other parts of the layout. This is kind of how people look to be doing things today with the viewlets revolution that's going on in Grok land; look at: http://svn.zope.org/Grokstar/trunk/src/grokstar/blog.py?rev=87483view=auto and note how many of the grok.View objects are specifying the same dratted template, over and over again, and then rely on viewlets to actually fill in the varying parts of each page that change with the content. It struck me as a situation that is just crying out for a grok.Layout local utility that provides the template everywhere under a part of a site automatically, so that the grok.template(...) declaration does not have to get repeated so incessantly. It really looks to me like Grok best-practices are evolving towards a layout-centric, rather than a macro-centric, approach, and that something like the Vudo approach would make this all easier to manage. Do I sound on-target, or like I'm missing something? -- Brandon Craig Rhodes [EMAIL PROTECTED] http://rhodesmill.org/brandon ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope] ZSyncer Zope 2.10
Hello All, We've recently completed an upgrade to Zope 2.10.5 on one of our servers and we've begun to encounter problems with ZSyncer. We use ZSyncer to synchronize objects between this server and another running Zope 2.9.8 (both have ZSyncer 0.7.1 installed). When attempting to put folders from the 2.10 server to the 2.9 server, the process hangs and nothing is transferred. However, when we attempt to put individual objects, we are successful. Does anyone know what might be the cause of this issue? ZSyncer 0.7.1, which is the latest release, claims that it may not be compatible with Zope 2.9 and up, but we were able to use it successfully before this most recent upgrade to 2.10. If anyone is aware of a fix or a workaround, or simply has an insight into why this breaks for us, I would greatly appreciate the help. Sincerely, Craig Chasseur University of Michigan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope-dev] can we teach official Zope to start detecting HTTPS header?
I'm told that, here at Georgia Tech, we are running our Plone's Zope 2.10 behind pound, and that we need some way to signal it about which requests are coming in through http and which came through https, so that all of the links generated by Plone can start with the right protocol. So at the moment, users who type an https URL so that they can edit documents and enjoy some privacy immediately get kicked back to the http protocol the first time they click on a link. For an earlier version of our site, back on an earlier version of Zope and Plone, we edited Zope so that it detected an HTTPS header, if one was present, and allowed the value: HTTPS: on to change the protocol variable from HTTP to HTTPS. Then we told pound to provide that header when an https request was made, and to delete the header otherwise, and everything worked fine. Would there be any chance of getting this change into Zope trunk today, or is it too specific a need to be worth adding to the code just for us folks using pound at Georgia Tech? The patch, in the form in which we first wrote it back at the beginning of 2007, is attached for the curious. Thanks for any feedback! --- /usr/local/zope-2.9.5/lib/python/ZPublisher/HTTPRequest.py 2006-10-02 11:53:33.0 -0400 +++ /usr/local/zope-2.9.5/lib/python/ZPublisher/HTTPRequest.py 2007-01-03 18:20:35.0 -0500 @@ -294,6 +294,10 @@ if have_env('HTTPS') and ( environ['HTTPS'] == on or environ['HTTPS'] == ON): protocol = 'https' +elif have_env('HTTP_HTTPS') and ( +environ['HTTP_HTTPS'] == on or +environ['HTTP_HTTPS'] == ON): +protocol = 'https' elif (have_env('SERVER_PORT_SECURE') and environ['SERVER_PORT_SECURE'] == 1): protocol = 'https' -- Brandon Craig Rhodes [EMAIL PROTECTED] http://rhodesmill.org/brandon ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope] ZPyGresQL Connection Add Error
I am trying to get ZPyGreSQLDA-0.3 working with Zope 2.3.0b2 The Product installs fine, but when I try to add a connection, I get this error: Error Type: IOError Error Value: [Errno 2] No such file or directory: '/usr/lib/zope/lib/python/Shared/DC/ZRDB/connectionAdd.dtml' I checked and this connectionAdd.dtml file is actually located here: /usr/lib/zope/lib/python/Shared/DC/ZRDB/dtml/connectionAdd.dtml Unfortunately, I do not no how to fix this. Thanks -- \ Craig "Cowboy" McDaniel /_\ Software Engineer /_/_\ Internet Tool Die /_/_/_\ [EMAIL PROTECTED] /_/_/_/_\ (502) 584-8665 ext 108 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] object properties
Matt wrote: I tried a few things and found the following useful : Property ids of dtml-var "PARENTS[0].id" are dtml-var "PARENTS[0].propertyIds()" And of you want to actually see property values, you could try dtml-var propertyItems which generates id/property tuples. Craig -- Craig Allen - Managing Partner - Mutual Alchemy Web Architecture - http://alchemy.nu ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ZClass Date Fields
I'm sure you've heard this question before, so bare with me. I went through the ZClass tutorial and got everything working right except Date properties. Lets assume, for example, that my ZCLass is called CDClass. When I create a new CDClass instance (using the addForm), it always uses the default date for Date properties instead of the ones I've entered in the form. A co-worker of mine has had the same problem but we have not yet discovered why. Thoughts? Solutions? Later, -- \ Craig "Cowboy" McDaniel /_\ Software Engineer /_/_\ Internet Tool Die /_/_/_\ [EMAIL PROTECTED] /_/_/_/_\ (502) 584-8665 ext 108 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Solution Suggestions?
Unfortunately I do not know enough about Zope yet to know what the best approach is to solving my problem, so please let me know if you have any suggestions or have done something similar before. I am trying to build a "tips" site and am trying to decide on how to store the tips. The options I can think of are database, XML documents (stored within Zope), or my own custom Zope object type or product. I've read a little about XML documents in Zope, but I know nothing about creating my own object types or products. Can anyone give me some advantages (and disadvantages) of the latter approach? Perhaps there is already a product for something similar. Squishdot is slight overkill for what I'm looking for, although I would eventually like to attach discussion threads to each tip, so maybe it is not. This is the information that would need to be stored for each tip (hypothetically) : Tip title Abstract Tip text Author (email, etc...) Date submitted Date approved (if we allow users to submit tips) Number of hits (so we can have a "10 most popular", etc...) Image link ...and more may be added as time goes on. Any thoughts? Later, -- \ Craig "Cowboy" McDaniel /_\ Software Engineer /_/_\ Internet Tool Die /_/_/_\ [EMAIL PROTECTED] /_/_/_/_\ (502) 584-8665 ext 108 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Change db connect string in python or dtml
Magnus Heino wrote: How can I change the 'Database Connection String' and then then try to connect, either in dtml or python? I think I understand what you are asking, since I am developing a database app and have switched about 20 methods back and forth between two database servers... it gets tedious. I assume you want a more automated way to do this, and it should be possible to write a python script (External method?) to do this, although I'm not sure how you would find all the ZSQL methods where you would do this. Perhaps something like this (the find form): http://www.yourserver.com/yourfolder/manage_findResult?obj_metatypes%3Alist=Z+Gadfly+Database+Connectionobj_ids%3Atokens=obj_searchterm=obj_mspec=%3Cobj_mtime=search_sub%3Aint=1btn_submit=Find As a quick and dirty alternative (untested), just edit your connection parameters in your Mysql connector to point to the different server (you'll want to close the connection first, I expect). -- Craig Allen - Managing Partner - Mutual Alchemy Web Architecture - http://alchemy.nu ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Batchpeocessing with multiple selection
vikas wrote: display only 10 rows on the page.For this i am using batch processing. But it is giving me errors Such as key error [city],[state] and gives the url of my page where i m using batchprocessing. Can someone help me out how to overcome the problem this problem as this is very urgent for me. I think the varibles are not geting passed again when i click on next sequence. For an example, create a Z Search Interface going against your ZSQL method, them enhance it. As was pointed out, this runs the query again but since you can cache the results, the database is not necessarily hit again. -Craig -- Craig Allen - Managing Partner - Mutual Alchemy Web Architecture - http://alchemy.nu ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] seeking help on roles, authorization, permission
I've largely been able to ignore most of the Zope security mechanisms until now, but I have this new intranet app that's causing me problems. I have a folder called Reuters that has my application's methods; it has a subfolder called Staging that has documents being reviewed and subsequently published. I need to be able to limit the publishing to specific individuals. I created users in the Users Folder in my Reuters directory. I also created an editor role in my Reuters folder, and gave it what I thought were appropriate permissions, including manage_properties. I assigned the editor role to each of my new users. Users work in the Staging folder. When my users try to publish - which invokes a method that changes properties on documents in the Staging folder and also properties of the Reuters folder, they are prompted to log in by their browser. However, their usernames and passwords do not seem to work, and after 3 tries, they get a Zope error page saying they do not have permission to manage_changeProperties. I don't get it. Any clues? Craig -- Craig Allen - Managing Partner - Mutual Alchemy Web Architecture - http://alchemy.nu ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: [ZDP] Re: [Zope] The agony of the ZOPE Documentation
I must apologize in advance, I have not read the entire thread, but here's my answer to your question: So what do you folks think? My advice: be a benevolent despot. I started to get involved with ZDP many months ago, and proposed a structure for documentation, created a folder hierarchy to support the proposed framework (some of which was still evident on the ZDP site for a long time), and generally got zero feedback or support. My perception of the problem was that no one was in charge, no one could say yeah or nay, and no one said "This looks like a good direction for now, let's pursue it". Not that I necessarily thought that my work was the ultimate answer, but no one else was either proposing an alternative or suggesting needed modification. Instead, other folks just did their own thing. Now it looks like individuals get energized, produce a body of work (e.g. ZBook, ZQR) and then get burned out. My suggestions are, in decreasing preference: - consult with experts in learning/documentation design to come up with a framework for documentation; and/or, - find a site, product, book, or documentation set for a comparable product, and copy ideas from it; and/or, - work with ZDP activists and the mailing lists to come up with a framework, identify materials and formats to fit the framework, identify gaps, and then start assembling the structure. This is my least preferred path just because I'm skeptical that a group effort will move fast enough. I recognize that this is counter to Open Source practice, but I really believe inadequate documentation is the main barrier between Zope and world domination! And good luck! Zope remains a great tool with an excellent user/support base, let's make it better. Craig ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )