Re: [Zope-dev] Linux Zope - Win2K SQL Server?
Does it also work with SQL Server 7.0? thanks phil *** REPLY SEPARATOR *** On 08.12.2000 at 10:10 Anthony Baxter wrote: Use the Sybase client libraries, with ZSybaseDA. We do that here, and it works fine (but not for much longer, byebye sqlserver...) Or FreeTDS, but I don't think it's thread-safe, so you'll need to use a Thunked adaptor. "Neil K" wrote I'm still trying to figure out what the missing pieces are... if anyone else has gotten a Linux Zope talking to a Win2K SQL Server 2000, I would appreciate some guidance. It seems I would have to write my own Product from scratch to do this, no matter what. None of the ODBC Products seem to be available for Unix, and ODBC from Unix - Windows will require additional software like EasySoft's ODBC Bridge anyway. Or I could just not use ODBC at all and make some Product customized to MS SQL Server. Some may suggest using ActiveState's Perl Methods for Zope and DBD::Proxy. :) It's a possibility, but I'd like to see if more conventional solutions exist. -- Neil Kandalgaonkar, ActiveState ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) -- Anthony Baxter [EMAIL PROTECTED] It's never too late to have a happy childhood. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZPatterns: General Design Question
As part of a Customer Relationship Management system our company is developing, we have a Licenses specialist which manages product licenses. All license objects do not have the same attributes however. The various attributes relating to different licence types are not known attributes from the outset. My idea is to have a LicenseType class for which the user can define extra attributes per instance eg: LicenseType1 with properties A,B,C LicenseType2 with properties D,E,F When new licenses are created the user first selects a LicenseType. Based on this selection the properties of the selected LicenseType are added to a specific License instance. As I see it one can take two approaches to this: a) either add a single dictionary property for both license and licensetypes which holds user defined attributes or b) explicityly call manage_addProperty per instance to add properties. Any ideas? Roché ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns: persistant objects hold DataSkin-Items - KeyError: _v_dm_
I'm searching for something that handles a newItem(meta_type,key) function that is provided from the FwCS who decides which object-type is created and gets those attributes from the customizer Just use the normal Zope "add list" to create one manually, or call the appropriate constructors (e.g. SomeZClass.createInObjectManager()). after a while I think I got it now. I use a FcWS as a Folder like usual in Zope and if i create an object of a type which is "customized" certain attributes will be set through the customizer. so for a database app that handles multiple tables it isnt useful to handle with a FwCS. First I thought there is the same "magic" as if i ..getItem() with a specialist .. in a FwCS Due to the Folders Rules, there can only by one object with the same id at a time in one FwCS .. I'll switch back to a Specialist which has many racks as data-providers which i can choose the right one with a method that has a "meta-type" parameter. is this right so far ?? Ulrich Eck ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns: persistant objects hold DataSkin-Items - KeyError: _v_dm_
At 02:49 PM 12/14/00 +0100, Ulrich Eck wrote: after a while I think I got it now. I use a FcWS as a Folder like usual in Zope and if i create an object of a type which is "customized" certain attributes will be set through the customizer. Yes. so for a database app that handles multiple tables it isnt useful to handle with a FwCS. Um, not necessarily. You can create regular Folders under the FwCS if you want to keep them seperate. You can even use BTreeFolders or other ObjectManagers, if you like. All that's required is that they support the ObjectManager protocol. So you can have a folder for each meta_type. Of course, the primary storage of the object has to be the ZODB. First I thought there is the same "magic" as if i ..getItem() with a specialist .. in a FwCS No. The FwCS is to allow more "traditional" Zope objects to blend in data from other sources, and/or to have trigger support. Due to the Folders Rules, there can only by one object with the same id at a time in one FwCS .. Yes. But you don't have to place the DataSkins directly under the FwCS, they can be any number of nesting levels below it. I'll switch back to a Specialist which has many racks as data-providers which i can choose the right one with a method that has a "meta-type" parameter. is this right so far ?? Pretty much, although I'm not sure why you want to pick by meta type, since one of the major reasons for having a Specialist is for the rest of the application not to know about specific meta types. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns: General Design Question
At 02:42 PM 12/14/00 +0200, Roch'e Compaan wrote: As part of a Customer Relationship Management system our company is developing, we have a Licenses specialist which manages product licenses. All license objects do not have the same attributes however. The various attributes relating to different licence types are not known attributes from the outset. My first reaction to this is that I would use a different class for each type of license, and a rack in the specialist for each class. This would allow maximum behavioral flexibility, since each class can have its own methods for inputting or displaying data. However, if your application needs to have end-user (as opposed to integrator-user) definition of license types, then you need to add LicenseType to your domain model and create a specialist for it (possibly nested inside the Licenses specialist). As I see it one can take two approaches to this: a) either add a single dictionary property for both license and licensetypes which holds user defined attributes or b) explicityly call manage_addProperty per instance to add properties. Option "b" will make your application ZODB-dependent, since there is no way to map arbitrary attributes to an SQL database, for example. Option "a" is better, since a dictionary attribute can be handled with WITH/COMPUTEs and triggers, with a little work. There is also an option "c", which would be to model LicensePropertyDefinition and LicenseProperty objects in your domain model. This approach leads to a bit more work defining your model, as well as in setting up the specialists and their interactions, but the payoff is in better documentation of what your app is doing and easier re-mapping from one database type to another. Ty and I recently experienced something similar, in an application where we were using a dictionary attribute to represent something that was better modelled as a seperate object. The complexity of the associated SkinScript and DTML/Python/SQL methods went down after we bit the bullet and added a nested Specialist. (When a role in a domain model is only accessed from one other role, it is reasonable to nest that role's Specialist inside the other's, as it keeps the higher-level app namespace cleaner. Usually there is some clustering to domain models that puts a small number of supporting classes in a position to do this for each major class.) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] [ZPatterns] DataSkin object ownership
In article [EMAIL PROTECTED], Phillip J. Eby [EMAIL PROTECTED] wrote: At 08:04 PM 12/12/00 -0500, BS wrote: Do DataSkins have ownership? I want to give multiple users the ability to add objects to a rack and only allow the 'owner' to view/edit the object. DataSkins stored in Racks do not participate in the Zope ownership mechanism, nor the creation of the 'Owner' role. This is because they are To clarify: if you just want Owner roles, as opposed to Ownership[1][2][3], you can do that with totally-non-ZODB objects. I have a couple different applications where totally SQL- or LDAP- are given local roles (Owner and others) to implement security as you describe. The way we do it requires LoginManager to be in use, or to have patched Zope with improvents to the local roles support (LM effectively hotfixes these in for its own users). Then our DataSkins-based ZClasses also mix in AppTabs[4], which has a get_local_roles_for_user() which tries a LocalRolesForUser() method if it exists, otherwise falls back to older means. Finally, you can define LocalRolesForUser to compute local roles for the accessing user by whatever rules it wants. [1] People may complain about ZPatterns terminology, but at least we have the sense not to use the same word for two entirely different concepts! :-) [2] And I don't know why you'd care about Ownership for your objects in this example... it doesn't seem meaningful for these sorts of non-code objects. [3] Actually, maybe you could write SkinScript to provide the _owner attribute. But see [2]... [4] Unreleased product, still in some flux. It mainly provides fancier, more flexible version of Zope's management tabs, suitable for use in an application (that is, suitable for exposing to users, not just developers). It also has some local roles hooks as mentioned. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Catalog class--does it support boolean queries?
I am working on a project which requires the use of the Catalog class (versus ZCatalog) for indexing and querying. I have basic full text indexing and querying working correctly but boolean queries seem not to work. Should boolean queries work using Catalog or is it necessary to use ZCatalog instead to get that functionality? This is how I am submitting the query to the Catalog object: results = sdb.cat({"content" : query}) where sdb is a ZODB, cat is the catalog object, and content is the name of the full-text index. query is the query the user typed, which could be "(apples and oranges) or plums" (without the quotes) for instance. Thanks in advance for any assistance anyone can provide on this question. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Catalog class--does it support boolean queries?
Marc Conley wrote: I am working on a project which requires the use of the Catalog class (versus ZCatalog) for indexing and querying. I have basic full text indexing and querying working correctly but boolean queries seem not to work. Should boolean queries work using Catalog or is it necessary to use ZCatalog instead to get that functionality? This is how I am submitting the query to the Catalog object: results = sdb.cat({"content" : query}) where sdb is a ZODB, cat is the catalog object, and content is the name of the full-text index. query is the query the user typed, which could be "(apples and oranges) or plums" (without the quotes) for instance. Thanks in advance for any assistance anyone can provide on this question. You should be able to do what you want using just catalog. If your example query is an example of something you are really using, try it without parens. e.g. "apples and oranges or plums" AFAIK grouping in query strings is not supported. -- | Casey Duncan | Kaivo, Inc. | [EMAIL PROTECTED] `-- ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Catalog class--does it support boolean queries?
Marc Conley writes: Should boolean queries work using Catalog or is it necessary to use ZCatalog instead to get that functionality? ZCatalog is nothing more than a thin wrapper around Catalog (to make a Catalog a persistent object in ZODB). All search facilities of ZCatalog are in fact implemented by Catalog. This implies: Catalog can do boolean queries. Note: the catalog has notorious bugs (at least until Zope 2.2.2). If it does not work, it may be one of these bugs. Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] IE5 / Medusa bug?
Tempting fate by claiming a bug...but although I'm sure I'm at fault here, there's no sensible reason for the results I'm getting. When I view one of several different pages with IE5, the last 11 bytes don't reach the browser. I've got a couple of other people to try it out. One of them reported the same symptoms, the other didn't. I don't get it with Netscape. I'd *really* appreciate it if anyone who has IE5 could have a go at http://test.jamkit.com and let me know (you can tell if the bug's happened if the source ends abruptly with something like '/ta'). Things I've deduced: - http://test.jamkit.com/index_html works :S - It's not related to the bad HTML in that example page (I've tried pages with perfect HTML) - It's related to how I've built the page (the Zope Welcome screen is fine, other pages built using the same product don't work. The product I'm building is a folderish thing with lots of extra navigational services) - it's always the last 11 bytes that are missing, however large the page is - I've sent exact copies of the HTTP headers to the server, using telnet, and there's no problem there I imagine the fact that I can make it work by adding index_html is the most telling point, but it's not telling me anything ;) I'll continue my research by eliminating elements until I've nailed down exactly the bit that's messing it up. Right now, though, I have to go to bed. Meanwhile, any comments? Cheers, seb ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Core Session Tracking Development Release 0.1
Hi, A development release of the fruits of the "core session tracking" Fishbowl project (http://dev.zope.org/Wikis/DevSite/Projects/CoreSessionTracking/FrontPage) is available at http://www.zope.org/Members/mcdonc/Products/CoreSessionTracking. It allows you to keep state across requests for anonymous users (much like FSSession, SQLSession, HappySession, etc.), but it is capable of storing sessioning data in the ZODB or in RAM. You need to be running a pretty recent Zope 2.2.X to use it. I've tested it continually against the current trunk release, and it works against that. Feedback appreciated! Thanks, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Zope] IE5 / Medusa bug?
From: seb bacon [EMAIL PROTECTED] I imagine the fact that I can make it work by adding index_html is the most telling point, but it's not telling me anything ;) Leaving off index_html causes Zope to add a base href to the head. That's the only difference I can think of. Your page doesn't get cut short in my IE 5.00.2314.1003 (128 bit encryption). Cheers, Evan @ digicool 4-am ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZPatterns, ZClasses, Specialists: Assigning responsibilities
I'm having problems deciding where certain methods should be implemented. In some cases it's easy - for example, objects manage themselves, Specialists manage collections, so editInstanceForm belongs in the ZClass, while listOpenOrders belongs in the Specialist. But here are some cases where it's not as clear: 1. I want to edit an object from the editing form of another object. So I give my object an editInstanceSnippet method. It's very similar to editInstanceForm, except that it's not a full html document. Should it go in the ZClass? But it's a method used for application integration - so maybe it belongs in the Specialist? 2. In a typical shopping cart application, a Product object will be responsible for adding itself to an order, right? So the Product will have an addMeToOrderForm, which will call addMeToOrder, which in turn will call order.addOrderLineItem method. I think. But here's a complication: I have the following ZClasses, with matching Specialists: Product, Graphic, Order, OrderLineItem. When a customer adds a product to their order, they have to provide a graphic file which will be printed on the product (imagine buying a lunch box with your cat's photo on it). The Graphics Specialist can provide a addGraphicSnippet form. But who's responsible for asking for this graphic when adding the product to the order? Is it still the Product object? But a Product turns into a Product-with-Graphic only when it's a part of an order, so is it correct for the Product to even know about Graphics? the alternative is to move the addToOrder methods to either Order or OrderLineItems, but this doesn't make any more sense because these would then have to know a lot more about a Product than is good for them. Any ideas? TIA Itai -- Itai Tavor"Je sautille, donc je suis." C3Works[EMAIL PROTECTED] - Kermit the Frog "If you haven't got your health, you haven't got anything" ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] keyword indexes
Hi, Currently I am wrestling with "keyword" indexes in ZCatalogs. How do I query the ZCatalog for all records of objects indexed on a particular keyword. For instance if my index is named MediaKeyword ive tried: dtml-in "Catalog.searchResults( MediaKeywords = ['ouch'] )" this has completely unpredictable results. dtml-in "Catalog.searchResults( MediaKeywords in ['ouch'] )" this returns all indexed objects! What am I doing wrong? Is there a special ZCatalog function for querying keyword indexes? I need some insight into this problem. Thanks! Josh Zeidner ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] more on keyword indexes
Hello, I did a little more investigiation into the problem, and couldnt really find any documentation anywhere on what the actual semantics are of keywords and how they are queried. For instance: I have three classes and each has an keyword index named KW: ObjectOne:KW = ['one','blue','furry'] ObjectTwo:KW = ['two','flying','purple'] ObjectThree: KW = ['three','one-eyed','purple'] If I were to query the ZCatalog with the following set of words: ['purple'] I would expect to get: ObjectTwo ObjectThree Right? If I query the database with ['one','two'] ( if this type of thing is at all possible ), I get : ObjectOne ObjectTwo This seems like the obvious result: BUT: it depends if you want a AND/OR type search. I could also expect to get nothing( if its an AND type search because no records match 'one' and 'two' ). Here is better example, what if I queried: ['purple','one-eyed']. Would I be expecting only ObjectThree or [ ObjectThree, ObjectTwo ] ( because they both match the keyword purple( a logical set-intersection ) ). Also I found the keyword indexes to have some more obvious bugs. If I only used one keyword for the matching critiria, for instance if I used 'purple' , I would only get ObjectTwo. Is anyone else using keyword indexes? In what way are you using them? Thanks, Josh Zeidner http://www.brooklynmedialabs.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] urllib not available in Python Scripts?
Hi, sorry for the recent barrage of posts... In Python Methods I could do urllib.quote(...). This doesn't work in Python Scripts. Is quote considered a security risk? Itai -- Itai Tavor"Je sautille, donc je suis." C3Works[EMAIL PROTECTED] - Kermit the Frog "If you haven't got your health, you haven't got anything" ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [Zope] IE5 / Medusa bug?
On Thu, 14 Dec 2000, Evan Simpson wrote: From: seb bacon [EMAIL PROTECTED] I imagine the fact that I can make it work by adding index_html is the most telling point, but it's not telling me anything ;) Leaving off index_html causes Zope to add a base href to the head. That's WHOW ! base href is exactly 11 bytes long. Couldn't it be that the content-length is computed by Zope before you automatically add this tag ? just my 0.02 euros Jerome Alet ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )