Re: [Zope-dev] Is ZFormulator alive?
No, superuser doesn't work. My workaround for the moment is to comment out line 302 ( __roles__ = ('Manager',) ) and waiting for Martijns new release. Thanks Arno On Wed, 14 Mar 2001, R. David Murray wrote: On Tue, 13 Mar 2001, Arno Gross wrote: Any hints? A *workaround* (that worked as of 2.2, not sure about 2.3 (of zope)) is to log in as the superuser to create the fields. --RDM ___ 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] Is ZFormulator alive?
Sorry, but that doesn't seem to solve the problem. If I take away line 312 I can create new fields. But I assume that there is then a security hole. Any hints? Arno On Mon, 12 Mar 2001, Spicklemire, Jerry wrote: Arno said: I am currently checking ZFormulator and could import the demo, but was unable to add new input fields. From a post by Steve Spicklemire to the Zope list, October, 27th, 2000: " line 312: Form.py should be: __roles__ = ('Manager',) " This was quickly retrieved by searching at NIP Ltd. http://zope.nipltd.com/public/lists/zope-archive.nsf/ Thanks again Steve, and NIP folks! Jerry S. ___ 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] Is ZFormulator alive?
I am currently checking ZFormulator and could import the demo, but was unable to add new input fields. Zope was asking for authorization (but I had already 'manager' role). Working with Zope 2.3. I hope it's not difficult to fix this. Arno Gross, email: [EMAIL PROTECTED] On Thu, 01 Mar 2001, [EMAIL PROTECTED] wrote: ZFormulator looks like it will do some pretty neat things, but it also looks like it is "dormant". Does anyone use it, or know if it is compatible with Zope 2.2.x and/or Zope 2.3? Thanks -paul ___ 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] Getting parent within ZClass hierarchy
Easy question, but I couldn't find the answer. How can I access the id (or title) of the parent containing my current object? E.g. NewsContainer |---NewsCategory ( ZClass - ObjectManager) |---NewsItem (ZClass - CatalogAware) I'm looking for a method (Python script) in NewsItem, which give me the id or title of its parent. Thanks Arno Gross, email: [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 )
[Zope-dev] Stop words/vocabulary
Can I apply stop words in a ZCatalog? Are there stop words for german available? If not I would try to compose a stop word list for german and publish it. Thanks Arno Gross, [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 )
[Zope-dev] ZCatalog/TextIndex/OR - keyword search
I understand that the search terms for a field with TextIndex are ORed and the fields in a search form are ANDed. But assume the following: * I have three fields (eg. abstract, content, title) with TextIndex * I have one field (eg. category) with FieldIndex When searching I want just give a keyword for the three TextIndex fields and a search term for category. The applying expression should look like this: (abstract=keyword OR content=keyword OR title=keyword) AND category=searchTerm Any hints? Thanks Arno Gross, email: [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] ZCatalog/TextIndex/OR - keyword search
Hi Steve, maybe I'm missing one step. If I create a TextIndex for search_text (or PrincipiaSearchSource) I have to tell somewhere how this index is composite? Becaus I try to list PrincipiaSearchSource in my result list it's empty. Thanks Arno Gross, email: [EMAIL PROTECTED] On Thu, 08 Feb 2001, Steve Alexander wrote: Arno Gross wrote: I understand that the search terms for a field with TextIndex are ORed and the fields in a search form are ANDed. But assume the following: * I have three fields (eg. abstract, content, title) with TextIndex * I have one field (eg. category) with FieldIndex When searching I want just give a keyword for the three TextIndex fields and a search term for category. The applying expression should look like this: (abstract=keyword OR content=keyword OR title=keyword) AND category=searchTerm Any hints? Create a method or computed attribute called "search_text" that returns the concatenation of abstract, content and title. In ZPatterns I'd use the following SkinScript: WITH SELF COMPUTE search_text='%s %s %s' % (abstract, content, title) An equivalent PythonScript as a method of your ZClass would be: name: search_text return '%s %s %s' % (container.abstract, container.content, container.title) Use a similar method in a python class, replacing "container" with "self". Set up search_text as a TextIndex in your ZCatalog. Then, query the catalog with something like: Catalog(search_text=keyword_for_query, category=searchTerm) The standard name for the search_text method or attribute is PrincipiaSearchSource. That's why PrincipiaSearchSource is a default TextIndex in a new ZCatalog. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ 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 )
Re: [Zope-dev] ZCatalog/TextIndex/OR - keyword search
Steve, thanks for your hints. At moment I'm working with version 2.2.3 and could't bring it to work. Should it work? So I switched now tho 2.3 and after some struggles it works. Actually I have ZClass objects. Best regards Arno Gross, [EMAIL PROTECTED] On Thu, 08 Feb 2001, Steve Alexander wrote: Arno Gross wrote: Hi Steve, maybe I'm missing one step. If I create a TextIndex for search_text (or PrincipiaSearchSource) I have to tell somewhere how this index is composite? Becaus I try to list PrincipiaSearchSource in my result list it's empty. You need to provide a method or property or attribute that gives the catalog the concatenated search text. You haven't said what kind of objects you are cataloging: are they ZClass instances, Python class instances, DTML Documents... ? You may be able to use a PythonScript in the acquisition path of your objects to do this work. ___ 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] Storing part of an object on the file system
I had a similar problem. I'm using ExtImage, but I need some extensions for it. Because I using a RDMBS (currently MySQL) I wanted to have all the meta data in my RDMBS. For all my objects there is normally a 'InsertMethod'. This can be a ZSQL method (if just MySQL is involved) or it can be a DTML method. For inserting an Picture object I have two steps in my DMTL InsertMethod: dtml-let ret="manage_addProduct['ExtFile'].manage_addExtImage(title=_['PICTURE.TITLE'], descr=_['PICTURE.DESCR'], file=_['PICTURE.FILE'], content_type='', create_prev=create_prev, maxx=maxx, maxy=maxy, ratio=ratio, permission_check=permission_check, REQUEST=REQUEST)" dtml-if expr="_.string.find(ret,'success') != -1" dtml-call "REQUEST.set('PICTURE.PIC_NAME_ID',_.string.strip(getImageName(message=ret)))" dtml-call "REQUEST.set('PICTURE.TITLE',_['PICTURE.TITLE'])" dtml-call PictureInsertMethod // this is a ZSQL Method dtml-call "RESPONSE.redirect('SearchResult?GALERIE.GALERIE_ID='+ _.str(_['GALERIE.GALERIE_ID']))" dtml-else dtml-var ret /dtml-if /dtml-let Okay, it's not transaction safe for now, but that's is acceptable in my environment. Of course there can be some improvements. Hint: I extended ExtImage for dynamic resizing. A preview is computed on the fly. Maybe there is a need for this. I will send the extension to Gregor. Best regards Arno Gross, [EMAIL PROTECTED] On Thu, 08 Feb 2001, you wrote: Ok whack idea #34... Well sort of, the idea was sparked by ExtFile (yes its all his fault honest). We want to have files on the file system for many reasons which I won't go into now, just take it for granted. But we also want some of the objects information to be in the standard data.fs, so we can catalog it use acquisition provide a simple interface to it and so on. So far you are saying thats ExtFile and you are right. But we want to extend it to any object anywhere, instead of storing the data attribute in the object and pickling it in the ZODB I want to be able to store the data attribute on the file system. This gives us loads of advantages we also thought this would be extremely useful to other people. We've bounced around ideas on how to do this and here the only two so far: -we could overload the data attribute with a class that on Pickling into the ZODB instead writes it on to the filesystem... -we could in the ZODB put a hack to say if pickling something with so and so attribute do this instead... I feel like this something I should just not be doing, but it would be great if I could get it work... -- Andy McKay. ___ 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 )
Re: [Zope-dev] Stop words/vocabulary
Hello Dieter, I have now a german stop word list and would like to apply it for my current ZCatalog 'NewsCatalog'. But how? Or should I copy my list to the source (no good idea)? Thanks. On Thu, 08 Feb 2001, Dieter Maurer wrote: Arno Gross writes: Can I apply stop words in a ZCatalog? You can: ZCatalog's "Lexicon"'s (-- SearchSupport.Lexicon.Lexicon) have a method "set_stop_syn" to provide a mapping for synonyms and stop word. I think, the source documentation is wrong: It says, the mapping would map words to a list of synonyms. When I looked at the code in "SearchSupport/Splitter.c", I had the impression that a map from a word to a single replacement is expected. A "None" replacement signifies a stop word, other replacements can be used for stemming or synomyms. Are there stop words for german available? If not I would try to compose a stop word list for german and publish it. Good! 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 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] Umlaut in ZCatalog as break character
I'm trying to index german news items with ZCatalog. But ZCatalog seems to take german Umlaute as separator characters. Any pointers or switches? Thanks Arno, [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] manage_changeProperties in a loop
On Wed, 17 Jan 2001, Casey Duncan wrote: Try this: dtml-call expr="REQUEST.set('rangList','folder1;folder2;folder2')" dtml-in expr="_.string.split(rangList,';')" dtml-let folder="_[_['sequence-item']]" index="_['sequence-index']" dtml-call expr="folder.manage_changeProperties({'rang':index})" /dtml-let /dtml-in Also, why are you passing the folder ids in a string like this? Where are these names coming from, a form? Yes, the names are coming from a from where I can sort the folders for showing in the desired order. I know that I can use a list with a SELECTION tag. But will get only the selected options and I need all the options in the ordered sequence. Of course I could select programmatically all options before returning the form and then I could work the list. But how can I pass the objects instead of the string? Best wishes Arno Gross, [EMAIL PROTECTED] If so, there are ways to eliminate the whole string.split. Also, the code would not need to be this complex if the objects themselves can be passed instead of a delimited string of ids. -- | 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] MySQL with LAST_INSERT_ID()
Dieters assumption was right. LAST_INSERTED_ID() returns a numeric value and that seems to be the problem. So if I change the statement as this: SELECT CONV(LAST_INSERT_ID(),10,10) it works (CONV returns a string!) P.S. Soren, maybe you can update your HowTo with a short note. Another possibilty instead of using LAST_INSERT_ID can be using MAX(). That should work too. Thanks Arno On Sat, 06 Jan 2001, Dieter Maurer wrote: Arno Gross writes: SELECT LAST_INSERT_ID() This method works with Zope 2.2.4 under Linux and MySQL 3.22.32 but I got an error with Zope 2.2.2 under NT 4.0 and MySQL 3.22.29 Error, exceptions.KeyError: unhandled Sieht aus, als könnte der MySQL Anschluss den Rückgabewert von "LAST_INSERT_ID" nicht in einen Python Datentyp wandeln, würde deshalb gerne eine "unhandled" Funktion aus einen Dictionary auslesen, die leider nicht drin ist. Sieht für mich nach einem Upgrade auf eine neuere Version von MySQL bzw. seinen Python Anschluss aus. Allerdings müsste man zunächst den Traceback genau anschauen, ob meine Vermutung auch wirklich zutrifft. 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] MySQL with LAST_INSERT_ID()
Hi, I have a simple ZSQL method with this statement: SELECT LAST_INSERT_ID() This method works with Zope 2.2.4 under Linux and MySQL 3.22.32 but I got an error with Zope 2.2.2 under NT 4.0 and MySQL 3.22.29 Error, exceptions.KeyError: unhandled Any hints? Thanks Arno, [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 )
[Zope] Zope installations wordwide
Are there any figures about the installtions of zope in Germany, Europe and the world? Is there a list of Zope sites? Arno Gross email: [EMAIL PROTECTED]