cc:Mail Link to SMTP Undeliverable Message: Unknown user: Gustin Kiffney
Send Zope maillist submissions to zope@zope.org To subscribe or unsubscribe via the web, visit http://lists.zope.org/mailman/listinfo/zope or, via email, send a message with subject or body 'help' to zope-request@zope.org You can reach the person managing the list at zope-admin@zope.org (When replying, please edit your Subject line so it is more specific than "Re: Contents of Zope digest...") Today's Topics: 1. Re: Accessing .gif on disk with Python Product? (Martijn Pieters) 2. Previous Message (Tom Deprez) 3. Re: ZODB documents (Carlos de la Guardia) 4. Re: Accessing .gif on disk with Python Product? (Kevin Howe) 5. Re: Accessing .gif on disk with Python Product? (Martijn Pieters) 6. (no subject) (Casey Duncan) 7. Re: Previous Message (Chris Withers) 8. Zope installations wordwide (arno.gross@consotec.de) 9. Authentification with the SAM of NT (Security Account Manager) (Vincent) 10. Zope Crashes (memory corruption) resolved (Dieter Maurer) 11. RE: Authentification with the SAM of NT (Security Account Manager) (Chris McDonough) 12. Re: Zope installations wordwide (J. Atwood) 13. Success! ZPoPyDA 0.6.1 works! (Stephen Nosal) 14. PTK Member-Folder Object Properties (phew!) (David Riggs) 15. Can't add objects (Maarten Engelen) --__--__-- Message: 1 Date: Mon, 7 Aug 2000 18:15:47 +0200 From: Martijn Pieters <mj@digicool.com> To: "Performance.net Strategic Internet Solutions" <support@performance-net.com> Cc: ZOPE Mailing List <zope@zope.org> Subject: Re: [Zope] Accessing .gif on disk with Python Product? ZOPE Mailing List <zope@zope.org> On Mon, Aug 07, 2000 at 01:12:03PM -0300, Performance.net Strategic Internet Solutions wrote:
On Mon, Aug 07, 2000 at 11:21:53AM -0300, Performance.net Strategic Internet Solutions wrote:
I am writing a python product and want to display a GIF file in some of the manage_pages. It is not meant to be the "icon" property of the class, just an image to be included in DTML. I included it in my class as follows:
chooser = ImageFile('images/chooser.gif',globals()),
but when I call it in DTML (<dtml-var chooser>) I get the following:
<ImageFile instance at 014F1D90>
I thought maybe I could use an instance of the Image class:
chooser = OFS.Image('images/chooser.gif',globals()),
but this doesn't seem to work.
How do you create an instance of an Image in a Python Product?
ImageFile objects do not (like ZODB stored Image objects) generate an IMG tag when called. Image object, when called, generate an IMG tag that points the browser to the correct address to retrieve tha actual image.
With an ImageFile object, you need to construct the tag yourself. If this class has an instance foo, with this ImageFile attribute chooser, and the instance foo is stored in the root of your Zope ZODB, you need to point the browser to http://yoursever/foo/chooser. So your DTML needs to generate the following HTML:
<img src="http://yoursever/foo/chooser">
I don't know enough about your DTML, but if it is another attribute of the same class, you could use one of the URLx REQUEST variables or something to construct the URL for the image. Also, absolute_url() called on the foo instance may also work for a base URL.
Hope this helps.
Okay, I've done the following:
# Create the method in the .py Class File chooserIcon=ImageFile('images/chooserIcon.gif',globals()),
# Call from the .dtml File <img src="<dtml-var absolute_url>/chooserIcon" border=0>
absolute_url() works and the URL points correctly to http://myserver/foo/chooserIcon, but if I type in that URL directly, I get a "Not Found" error as though the method does not exist. I've double-checked that the image is there and named correctly, so it's not a syntax thing.
Perhaps I need to convert it to an "Image" object something like below?
# this doesn't work but illustrates the idea chooserIcon = Image( ImageFile('images/chooserIcon.gif',globals() )
Help! =:)
Hmm.. This is how Product Icons are stored, that is, as ImageFile objects. At product init time, a ImageFile objetcs is created for the Product icon and stroed in the special misc_ structure for later access. Have a look through the Product initialisation code, which is started up in OFS/Application.py::install_products(). -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | ZopeStudio: http://www.zope.org/Products/ZopeStudio ----------------------------------------------------- --__--__-- Message: 2 Date: Mon, 07 Aug 2000 18:23:15 +0200 To: zope@zope.org From: Tom Deprez <tom.deprez@uz.kuleuven.ac.be> Subject: [Zope] Previous Message Hi all, Please, forget my previous message! Next question : Is there an easier way for writing the following? <dtml-let position=sequence-item> <dtml-var expr="position+1">/<dtml-var count-CENTRE_NO> <dtml-let> This gives the sequence order of every record on the total amount of retrieved records. So far, this was the only way I could get it to work. Is there a better way (simpler) ? Thanks, Tom. --__--__-- Message: 3 Date: Mon, 7 Aug 2000 11:30:05 -0500 From: Carlos de la Guardia <cguardia@localhost.localdomain> To: zope@zope.org Subject: [Zope] Re: ZODB documents There is an old how-to at: http://www.zope.org/Members/michel/HowTos/ZODB-How-To There is also a slide presentation at: http://www.zope.org/Members/jim/zodbhtml/zodb.htm --__--__-- Message: 4 From: "Kevin Howe" <support@performance-net.com> To: "Martijn Pieters" <mj@digicool.com> Cc: "ZOPE Mailing List" <zope@zope.org> Subject: Re: [Zope] Accessing .gif on disk with Python Product? Date: Mon, 7 Aug 2000 13:38:56 -0300 charset="iso-8859-1" Right you are, here's how I solved it: # __init.py__ for myProduct misc_={ 'chooserIcon': ImageFile('images/chooserIcon.gif',globals()), } # DTML file <img src="<dtml-var absolute_url>/misc_/myProduct/chooserIcon" border=0> Thanks! Kevin ----- Original Message ----- From: "Martijn Pieters" <mj@digicool.com> To: "Performance.net Strategic Internet Solutions" <support@performance-net.com> Cc: "ZOPE Mailing List" <zope@zope.org> Sent: Monday, August 07, 2000 1:15 PM Subject: Re: [Zope] Accessing .gif on disk with Python Product?
On Mon, Aug 07, 2000 at 01:12:03PM -0300, Performance.net Strategic
Internet Solutions wrote:
On Mon, Aug 07, 2000 at 11:21:53AM -0300, Performance.net Strategic Internet Solutions wrote:
I am writing a python product and want to display a GIF file in some of the manage_pages. It is not meant to be the "icon" property of the class, just an image to be included in DTML. I included it in my class as follows:
chooser = ImageFile('images/chooser.gif',globals()),
but when I call it in DTML (<dtml-var chooser>) I get the following:
<ImageFile instance at 014F1D90>
I thought maybe I could use an instance of the Image class:
chooser = OFS.Image('images/chooser.gif',globals()),
but this doesn't seem to work.
How do you create an instance of an Image in a Python Product?
ImageFile objects do not (like ZODB stored Image objects) generate an IMG tag when called. Image object, when called, generate an IMG tag that points the browser to the correct address to retrieve tha actual image.
With an ImageFile object, you need to construct the tag yourself. If this class has an instance foo, with this ImageFile attribute chooser, and the instance foo is stored in the root of your Zope ZODB, you need to point the browser to http://yoursever/foo/chooser. So your DTML needs to generate the following HTML:
<img src="http://yoursever/foo/chooser">
I don't know enough about your DTML, but if it is another attribute of the same class, you could use one of the URLx REQUEST variables or something to construct the URL for the image. Also, absolute_url() called on the foo instance may also work for a base URL.
Hope this helps.
Okay, I've done the following:
# Create the method in the .py Class File chooserIcon=ImageFile('images/chooserIcon.gif',globals()),
# Call from the .dtml File <img src="<dtml-var absolute_url>/chooserIcon" border=0>
absolute_url() works and the URL points correctly to http://myserver/foo/chooserIcon, but if I type in that URL directly, I get a "Not Found" error as though the method does not exist. I've double-checked that the image is there and named correctly, so it's not a syntax thing.
Perhaps I need to convert it to an "Image" object something like below?
# this doesn't work but illustrates the idea chooserIcon = Image( ImageFile('images/chooserIcon.gif',globals() )
Help! =:)
Hmm.. This is how Product Icons are stored, that is, as ImageFile objects. At product init time, a ImageFile objetcs is created for the Product icon and stroed in the special misc_ structure for later access.
Have a look through the Product initialisation code, which is started up in OFS/Application.py::install_products().
-- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | ZopeStudio: http://www.zope.org/Products/ZopeStudio -----------------------------------------------------
--__--__-- Message: 5 Date: Mon, 7 Aug 2000 18:41:18 +0200 From: Martijn Pieters <mj@digicool.com> To: Kevin Howe <support@performance-net.com> Cc: ZOPE Mailing List <zope@zope.org> Subject: Re: [Zope] Accessing .gif on disk with Python Product? ZOPE Mailing List <zope@zope.org> On Mon, Aug 07, 2000 at 01:38:56PM -0300, Kevin Howe wrote:
Right you are, here's how I solved it:
# __init.py__ for myProduct
misc_={ 'chooserIcon': ImageFile('images/chooserIcon.gif',globals()), }
# DTML file
<img src="<dtml-var absolute_url>/misc_/myProduct/chooserIcon" border=0>
misc_ is a root level object. Using absolute_url you are acquiring it into your Instance URL, which is not necessary (and will hamper off-server caching). Use &dtml-SCRIPT_NAME; instead (which will give you the absolute url of the root object in all cases): <img src="&dtml-SCRIPT_URL;/misc_/myProduct/chooserIcon" border=0> -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | ZopeStudio: http://www.zope.org/Products/ZopeStudio ----------------------------------------------------- --__--__-- Message: 6 Reply-To: <casey.duncan@state.co.us> From: "Casey Duncan" <casey.duncan@state.co.us> To: <zope@zope.org>, <simon@nipltd.com> Date: Mon, 7 Aug 2000 10:46:04 -0600 charset="iso-8859-1" Subject: [Zope] (no subject) Simon Coles writes:
We have binary files stored in Zope, for example Word documents (but could be any of a variety of document types).
We would like to be able to index and search the contents of these files using ZCatalog. So if a Word file contains the word "Fred", then any search for "Fred" would include that file in the list of documents returned.
I have done something similar. I created a ZClass subclassing CatalogAware and File. I added a property called text which is text indexed in a catalog. When a Word document is added, a method I created uses the wvHtml utility to convert the Word document to text and store it in the text property. It has kind of a kludgey implementation at the moment, mostly because I want to create a Python wrapper around the wv library, but it's documentation is sketchy and I have other priorities at the moment. It does work though and lets you search Word documents using a ZCatalog quite effectively (although it only works for Word docs). Check out wv at http://www.wvware.com/ --__--__-- Message: 7 Date: Mon, 07 Aug 2000 17:45:04 +0100 From: Chris Withers <chrisw@nipltd.com> Organization: New Information Paradigms To: Tom Deprez <tom.deprez@uz.kuleuven.ac.be> CC: zope@zope.org Subject: Re: [Zope] Previous Message Tom Deprez wrote:
<dtml-let position=sequence-item> <dtml-var expr="position+1">/<dtml-var count-CENTRE_NO> <dtml-let>
how about: <dtml-var "_.getitem('sequence-index',0)+1">/<dtml-var count-CENTRE_NO> cheers, Chris --__--__-- Message: 8 From: arno.gross@consotec.de Subject: [Zope] Zope installations wordwide To: zope@zope.org Date: 07 Aug 00 16:58:52 UT --------------1DD2510B41FE Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable 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: arno.gross@consotec.de --------------1DD2510B41FE-- --__--__-- Message: 9 Reply-To: <vinc.del@wanadoo.fr> From: "Vincent" <vinc.del@wanadoo.fr> To: "[Zope Org] (E-mail)" <zope@zope.org> Subject: [Zope] Authentification with the SAM of NT (Security Account Manager) Date: Fri, 7 Apr 2000 19:10:16 +0100 charset="iso-8859-1" Hi, Does anyone know if Zope allows authentification of a user with the SAM (Security Account Manager) of Windows NT ? I mean : -> The user types his login/password -> and then, zope asks the SAM if this user does exists (or not). Thanks. Vincent --__--__-- Message: 10 From: Dieter Maurer <dieter@handshake.de> Date: Mon, 7 Aug 2000 19:14:56 +0200 (CEST) To: zope@zope.org Subject: [Zope] Zope Crashes (memory corruption) resolved Several times, I reported to the list about memory corruption problems with Zope 2.1.6 ZOracleDA 2.1.0 DCOracle (as of August 1999) Oracle 8.1.6 Sparc Solaris 2.7 This issue is finally resolved: The memory corruption occurs inside the Oracle 8 Client Library call OCILogoff. As * OCILogoff is only called, if DCOracle is compiled with -DORACLE8 * -DORACLE8 is only needed for Oracle 8 LOB support * the DCOracle LOB support does not work for Oracle 8.1 anyway we could simple recompile DCOracle without -DORACLE8 to get rid of the problem. As Matt (mailto:matt@digicool.com) reported, the problem is also avoided with a newer DCOracle version (1.3.1b1). Dieter --__--__-- Message: 11 From: Chris McDonough <chrism@digicool.com> To: "'vinc.del@wanadoo.fr'" <vinc.del@wanadoo.fr>, "[Zope Org] (E-mail)" <zope@zope.org> Subject: RE: [Zope] Authentification with the SAM of NT (Security Account Manager) Date: Mon, 7 Aug 2000 13:29:28 -0400 First, there is no such work as authentification. :-) OK, now that I got that off my chest, take a look at jcNTUserFolder (http://www.zope.org/Members/jephte/jcNTUserFolder), smbUserFolder (http://www.zope.org/Members/mcdonc/smbUserFolder), and Tres Seaver's Integrating Login Manager with SMB (http://www.zope.org/Members/tseaver/LoginManager_and_SMB). Any of these will work, depending on your situation. jcNTUserFolder is best if your Zope server runs on Windows. smbUserFolder or Tres' howto work best if your Zope server runs on anything else.
-----Original Message----- From: Vincent [mailto:vinc.del@wanadoo.fr] Sent: Friday, April 07, 2000 2:10 PM To: [Zope Org] (E-mail) Subject: [Zope] Authentification with the SAM of NT (Security Account Manager)
Hi,
Does anyone know if Zope allows authentification of a user with the SAM (Security Account Manager) of Windows NT ?
I mean :
-> The user types his login/password -> and then, zope asks the SAM if this user does exists (or not).
Thanks.
Vincent
_______________________________________________ Zope maillist - Zope@zope.org 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 )
--__--__-- Message: 12 Date: Mon, 07 Aug 2000 13:47:03 -0400 Subject: Re: [Zope] Zope installations wordwide From: "J. Atwood" <jatwood@bwanazulia.com> To: <arno.gross@consotec.de>, <zope@zope.org> My Limited List http://www.zope.org/Members/BwanaZulia/zope.html Jeff's Better List http://weblogs.userland.com/zopeNewbies/zopesites Netcraft Zope Server for July 2000 (only ones not running behind another webserver) http://www.netcraft.com/Survey/Reports/0007/byserver/Zope/ Also check out the case studies on Zope.org J
From: arno.gross@consotec.de Date: 07 Aug 00 16:58:52 UT To: zope@zope.org Subject: [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: arno.gross@consotec.de
--__--__-- Message: 13 Date: 7 Aug 2000 10:55:14 -0700 To: zope@zope.org From: Stephen Nosal <stephennosal@e3mil.com> Subject: [Zope] Success! ZPoPyDA 0.6.1 works! First, I would like to say thanks to everyone, who gave me a hand with this, especially jpenny@universal-fasteners.com. I learned a lot, and I am more comfortable with my system than ever. Below is a little note and question for Federico, who provided the patch that got the whole thing going again. Thanks again, - Steve Federico - This is the output of my compilation of ZPoPyDA 0.6.1 Two questions: 1) It looks for README before it creates it. 2) Make appears to do nothing. Just trying to figure it all out. - Steve root@fastclose:/opt/src/ZPoPyDA > ./autogen.sh --with-zope-datadir=/opt/fastclose automake: configure.in: installing `./install-sh' automake: configure.in: installing `./mkinstalldirs' automake: configure.in: installing `./missing' automake: Makefile.am: installing `./INSTALL' automake: Makefile.am: required file `./README' not found creating cache ./config.cache checking for a BSD compatible install... /usr/bin/ginstall -c checking whether build environment is sane... yes checking whether make sets ${MAKE}... yes checking for working aclocal... found checking for working autoconf... found checking for working automake... found checking for working autoheader... found checking for working makeinfo... found updating cache ./config.cache creating ./config.status creating Makefile creating README Now type 'make' to compile ZPoPyDA. root@fastclose:/opt/src/ZPoPyDA > make make: Nothing to be done for `all'. root@fastclose:/opt/src/ZPoPyDA > make install make[1]: Entering directory `/opt/src/ZPoPyDA' make[1]: Nothing to be done for `install-exec-am'. install -d /opt/fastclose/lib/python/Products//ZPoPyDA /usr/bin/ginstall -c -m 644 ./PoPyconnectionAdd.dtml PoPyconnectionStatus.dtml PoPyconnectionEdit.dtml PoPyconnectionTestForm.dtml __init__.py PoPy_db.py DA.py README ChangeLog AUTHORS COPYING PoPyconnectionAdd.dtml PoPyconnectionStatus.dtml PoPyconnectionEdit.dtml PoPyconnectionTestForm.dtml __init__.py PoPy_db.py DA.py \ /opt/fastclose/lib/python/Products//ZPoPyDA/ make[1]: Leaving directory `/opt/src/ZPoPyDA' root@fastclose:/opt/src/ZPoPyDA > __________________________________________________________________ Get your Private, Anti-Spam, Free Email at http://e3mil.com and Step into a Friendly Universe! --__--__-- Message: 14 Date: Mon, 07 Aug 2000 14:07:50 -0400 From: David Riggs <driggs@asset.com> To: zope@zope.org Subject: [Zope] PTK Member-Folder Object Properties (phew!) For each member in the Portal ToolKit, a folder is created in the folder 'Members', i.e: ZopeRoot/Portal/Members/member_name I've created a ZClass called Customize that has several properties, and I've added an instance of Customize (and called each instance Customize) in each member's folder. i.e.: /Portal/Members/member_name/Customize What I need is a way to access the value of these properties for any given member that is logged in at the moment. In other words, I can do this... <dtml-var "_.getattr(Members.member1.Customize, 'some_property')"> and get the value that I need for member1. I want the equivalent of replacing 'member1' with AUTHENTICATED_USER.getName()...I tried substuting it in and building a string with it, but that causes getattr to complain about strings not having the needed property. Any ideas on how to make this work, or ideas on how to do it a similar (or even completely different) way? --__--__-- Message: 15 Date: Mon, 07 Aug 2000 19:47:52 +0200 From: Maarten Engelen <maarten@mess.demon.nl> Reply-To: maarten@jvonet.nl Organization: Ars Digitalis To: zope@zope.org Subject: [Zope] Can't add objects I've installed Zope on an account at a hosting company. Zope runs perfect, but I can't add any new objects. I can edit existing object without any problems, but adding is impossible because of the 500 error which the server gives. Does someone have any idea what could cause this problem? --__--__-- _______________________________________________ Zope maillist - Zope@zope.org --__--__---- End of Zope Digest
participants (1)
-
Administrator