Re: [Zope] Re: Output only the first or a particular record using TAL

2005-09-28 Thread Tino Wildenhain
Am Mittwoch, den 28.09.2005, 16:32 +1000 schrieb Julian Yap: --- Chris Withers [EMAIL PROTECTED] wrote: ... Now, if you really can't stop your sql returning more than one row (LIMIT 1 anyone?) then how about: tr tal:define=customers container/getCustomerLicences;

[Zope] Re: Output only the first or a particular record using TAL

2005-09-28 Thread Julian Yap
--- Chris Withers [EMAIL PROTECTED] wrote: I used the following and it works great (without some formatting for clarity): tr tal:define=customer container/getCustomerLicences tal:condition=customer tdCustomer: span tal:content=python:customer[0]['full_name']/span/td /tr hmm,

Re: [Zope] Aquisition, UserFolder and security

2005-09-28 Thread bruno modulix
Dieter Maurer wrote: Hi Dieter bruno modulix wrote at 2005-9-27 11:34 +0200: I have a little problem with aquisition and security. We have a project using multiple CPS instances (for those that don't know CPS, it's a CMF based groupware/CMS) running in the same Zope instance, and being

Re: [Zope] Aquisition, UserFolder and security

2005-09-28 Thread Andrew Milton
+---[ bruno modulix ]-- | Dieter Maurer wrote: | | Hi Dieter | | bruno modulix wrote at 2005-9-27 11:34 +0200: | | I have a little problem with aquisition and security. We have a project | using multiple CPS instances (for those that don't know CPS, it's a CMF | based

Re: [Zope] Any hope of *merging* 2 'zope instance home's ??

2005-09-28 Thread Chris Withers
[EMAIL PROTECTED] wrote: I have 2 Zope/Plone sites each with their own 'zope instance home'. Any hope of *merging* these into *ONE* zope instance home so that I can do /search/ over both??? Wel, certainly possible to merge... How merge both Data.fs's? do a .zexp of the one site and import

Re: [Zope] including a ZPT inside a repeat loop

2005-09-28 Thread Chris Withers
Matthew White wrote: oops! I thought I'd clean up my code snippet to make it a little more readable, and instead introduced an error. Here it is in full: tal:loop repeat=t python:test(exists('/request/form/view_all'),

[Zope] Re: Output only the first or a particular record using TAL

2005-09-28 Thread Julian Yap
--- Tino Wildenhain [EMAIL PROTECTED] wrote: Am Mittwoch, den 28.09.2005, 16:32 +1000 schrieb Julian Yap: --- Chris Withers [EMAIL PROTECTED] wrote: ... Now, if you really can't stop your sql returning more than one row (LIMIT 1 anyone?) then how about: tr

Re: [Zope] Aquisition, UserFolder and security

2005-09-28 Thread bruno modulix
Andrew Milton wrote: (snip) And turning off Acquire roles on the security tab of the folders you don't want to have acquired doesn't work? This would probably be the cleanest solution here, and - shame on me - I didn't even think of it. Now the problem is that CPS has a very complex

[Zope] ZOPE and DEBIAN INSTALLTION

2005-09-28 Thread Benmania Guin
Hi, I successfully installed ZOPE on my VServer which has an DEBIAN op. I want to change ports now in order to have access via a normal HTTP request. How do I change ports and what port is the right one? Benjamin __ Verschicken Sie

Re: [Zope] ZOPE and DEBIAN INSTALLTION

2005-09-28 Thread Peter Bengtsson
If you're going to be using this lovely little zope instance I advice you to stay away from debian packages and do it with custom binary installations. I use debian for all my other programs but zope is what I do for a living so I'm not satisfied with the deb package way of doing it. And if you're

Re: [Zope] logging out (not zmi)

2005-09-28 Thread Dieter Maurer
[EMAIL PROTECTED] wrote at 2005-9-27 18:11 +0100: If i'm logged in as testuser and want to log in with a different user name, whats the right way of doing it? this is on zope 2.7 When you are using HTTP authentication, then logging out is difficult (and nasty). The following DTML method helps

Re: [Zope] Aquisition, UserFolder and security

2005-09-28 Thread Dieter Maurer
bruno modulix wrote at 2005-9-28 10:02 +0200: Dieter Maurer wrote: ... Sounds like a permission to role mapping flaw... Apparently, roles controlled by the Portal UserFolder (e.g. Authenticated) are allowed to do things in your CPM that you only be allowed by roles controlled by their

[Zope] Using Singletons

2005-09-28 Thread Doyon, Jean-Francois
Hello, Is there any support within the framework for singletons? What I call singletons are objects that are instanciated and persisted only once, or at least should be. I find myself wanting to use these in several instances, notably when I create a class/object that acts as a gateway to an

Re: [Zope] ZOPE and DEBIAN INSTALLTION

2005-09-28 Thread Benmania Guin
Yes. It was more a general question. I actually used the DEBIAN Version 'cause when I installed it, you had not sent your answer.- I am wondering whether everything will work properly if I have two servers both an apache AND Zope running. I distinguish them by ports - the normal 80 PORT for

Re: [Zope] ZOPE and DEBIAN INSTALLTION

2005-09-28 Thread Tino Wildenhain
Am Mittwoch, den 28.09.2005, 19:43 +0200 schrieb Benmania Guin: ... I distinguish them by ports - the normal 80 PORT for Zope (for all HTTP requests) and Apache using all other ports (using it as a mailserver and stuff). You use Apache as mailserver? Now thats interesting :-)

[Zope] Zope Debugger 0.8.0 Released!

2005-09-28 Thread Chris Withers
Zope Debugger is an enhanced version of pdb for use with Zope. It can be used simply by inserting the following lines in any python code you'd like to debug, including Script (Python)'s and FSPythonScripts: from Products.zdb import set_trace set_trace() It requires no changes to Zope, CMF or

[Zope] Re: Using Singletons

2005-09-28 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Doyon, Jean-Francois wrote: Hello, Is there any support within the framework for singletons? What I call singletons are objects that are instanciated and persisted only once, or at least should be. I find myself wanting to use these in

Re: [Zope] ZOPE and DEBIAN INSTALLTION

2005-09-28 Thread Andreas Pakulat
On 28.09.05 19:43:43, Benmania Guin wrote: I am wondering whether everything will work properly if I have two servers both an apache AND Zope running. As long as they don't use the same ports. I distinguish them by ports - the normal 80 PORT for Zope (for all HTTP requests) and Apache

[Zope] Re: Using the set object within page templates

2005-09-28 Thread Alexander Limi
A more interesting question: shouldn't it be available by default? It's a basic data strucure along the lines of lists and dicts, right? Or have I missed a use case for it where it may be scary to use in a Python Script? :) -- Alexander Limi On Mon, 26 Sep 2005 20:41:18 +0200, Andreas

Re: [Zope] logging out (not zmi)

2005-09-28 Thread Peter Bengtsson
I don't if it's been said or if it applies to your situation but try looking at CookieCrumbler which let's you use cookies instead of Basic Authentication for the Zope login. When you do this you have a much greater control over the cookies (any Python Script will do) and you can do stuff such

[Zope] External Method Working Directory?

2005-09-28 Thread jwithers
Folks, I have an external method that at this point is made up of nothing but os.getcwd() and lives in my Extensions directory. When it is run, it reports the working directory as being one of my Products directories. Can anyone tell me what the default working directory for an external method

[Zope] Re: Page Template security problem

2005-09-28 Thread Chris Beaven
Dieter Maurer wrote: *HOWEVER* note that proxy roles are not passed to called objects. Thus, emaildetails.htm does not run with proxy roles. If it accesses objects from admin folder, then you will get an Unauthorized. A possible solution could be: let sendDetail access and process all

Re: [Zope] External Method Working Directory?

2005-09-28 Thread Peter Bengtsson
Products?? That is odd. I thought it was the var/ directory or at least the zope instance home directory. From the External method you should have access to INSTANCE_HOME and SOFTWARE_HOME. Try if these are what you want. I doubt that you'll find your Extensions/ dir in any of them so you might

[Zope] SiteAccess (Enh. VHM) still needed, or merged to Zope?

2005-09-28 Thread Jeff Kowalczyk
Most references I find (google, The Plone Book - McKay, Building Websites W/ Plone - Cooper) on virtual hosting Zope behind Apache recommend starting with sfm's SiteAccess enhanced Virtual Host Monster product: http://www.zope.org/Members/sfm/SiteAccessEnhanced/view Reportedly last updated

Re: [Zope] Help with virtual hosting Zope on different ports

2005-09-28 Thread Michael Sanborn
I was a little reluctant to try this, since I'm not that agile with installing unix applications, but I gave it a shot. It actually wasn't that hard to install, and the performance difference it makes on my rickety old box is astonishing! Thank you very much for this tip! Jonathan Cyr wrote:

Re: [Zope] External Method Working Directory?

2005-09-28 Thread David Hassalevris
jwithers, a) Is your os.getcwd() (in /Extensions) called from a Product (in /Products?) Otherwise I have not idea b) Regarding temporary files .. I've used stuff like ... import tempfile tmpFile2 = tempfile.mktemp() theFile=open( tmpFile2,'rb') result = theFile.read()

[Zope-Checkins] SVN: Zope/trunk/lib/python/DocumentTemplate/cDocumentTemplate.c Fix incorrect docstring.

2005-09-28 Thread Chris Withers
Log message for revision 38664: Fix incorrect docstring. Changed: U Zope/trunk/lib/python/DocumentTemplate/cDocumentTemplate.c -=- Modified: Zope/trunk/lib/python/DocumentTemplate/cDocumentTemplate.c === ---

[Zope-Coders] Zope tests: 8 OK

2005-09-28 Thread Zope tests summarizer
Summary of messages to the zope-tests list. Period Tue Sep 27 11:01:01 2005 UTC to Wed Sep 28 11:01:01 2005 UTC. There were 8 messages: 8 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux From: Zope Unit Tests Date: Tue Sep 27 22:25:34 EDT

[Zope-dev] Re: [Zope-Checkins] SVN: Zope/trunk/lib/python/DocumentTemplate/cDocumentTemplate.c Fix incorrect docstring.

2005-09-28 Thread Chris Withers
Nah, I refer you instead to the docstring at the top of that file which says it's no longer used and is for reference only. It's already out of synch in implementation, so I don't see any point in fixing this one detail... cheers, Chris Victor Safronovich wrote: Hello Chris Withers,

[Zope-dev] Re[2]: [Zope-Checkins] SVN: Zope/trunk/lib/python/DocumentTemplate/cDocumentTemplate.c Fix incorrect docstring.

2005-09-28 Thread Victor Safronovich
Hello Chris Withers, Wednesday, September 28, 2005, 7:01:35 PM, you wrote: CW Nah, I refer you instead to the docstring at the top of that file which CW says it's no longer used and is for reference only. CW It's already out of synch in implementation, so I don't see any point in CW fixing

[Zope-dev] Re: [Zope-Checkins] SVN: Zope/trunk/lib/python/DocumentTemplate/cDocumentTemplate.c Fix incorrect docstring.

2005-09-28 Thread Chris Withers
Victor Safronovich wrote: Ok,butthismodulemaybeusedforinterfaces to MultiMapping,InstanceDict,TemplateDict. I'm afraid I don't follow you... And i used this module for increase my experience about dtml-templates. Sorry, but that's not a safe

Re: [Zope-DB] Installing DCOracle2 with Oracle 10g

2005-09-28 Thread Matthew T. Kromer
Not sure, but I think DCOracle2 includes both Python.h and stdio.h -- try removing stdio.h and making the python.h include the first include. On Sep 28, 2005, at 2:38 PM, Seth Gottlieb wrote: I have been trying to compile DCOracle2 and found the instructions from evstumpf at ucdavis.