[Zope-Coders] Zope tests: 8 OK

2005-10-19 Thread Zope tests summarizer
Summary of messages to the zope-tests list.
Period Tue Oct 18 11:01:01 2005 UTC to Wed Oct 19 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 Oct 18 22:27:01 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003351.html

Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Tue Oct 18 22:28:31 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003352.html

Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Tue Oct 18 22:30:01 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003353.html

Subject: OK : Zope-2_7-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Tue Oct 18 22:31:31 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003354.html

Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Tue Oct 18 22:33:01 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003355.html

Subject: OK : Zope-2_8-branch Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Tue Oct 18 22:34:31 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003356.html

Subject: OK : Zope-trunk Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Tue Oct 18 22:36:01 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003357.html

Subject: OK : Zope-trunk Python-2.4.2 : Linux
From: Zope Unit Tests
Date: Tue Oct 18 22:37:31 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003358.html

___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


Re: [Zope-dev] Mountpoints

2005-10-19 Thread Jim Fulton

Tim Peters wrote:

[Chris McDonough]


I think I may need some remedial SVN help because I don't want to do
this in a stupid way.  Hopefully someone will be willing to guide me
through this.



I'll be in FB tomorrow if you'd like to pair on it (while in theory
Jim might object, I think he thinks getting this done is important
enough to offer real help -- especially if he doesn't have to offer it
himself wink).


Works for me. :)

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
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] Mountpoints

2005-10-19 Thread Tim Peters
...

[Chris McDonough]
 Thanks for the offer!  I won't be able to visit ZC world HQ tomorrow,
 though unless you'd be there and willing to start around 10pm.

Alas, they're still under the delusion that 10 _am_ is late here, so
while I agree 10pm is saner on all counts, I'll be gone before then.

 Other duties is my official excuse but I'm also horrified by the idea that
 I'd be expected to wear pants if I came over there.  That's just uncivilized. 
 :-)

There was such a backlash against the pants required policy that
it's OK to wear diapers instead now.  Progress, anyway.

...

[Tim]
 Check.  Question:  does zodb-blobs-branch contain anything you _don't_
 want to see on Zope trunk now?  You didn't mention anything like that
 here.

 No (save for inappropriate svn:externals to ZODB and ZEO).

In that case, and since you say later there's no reason to keep this
branch after the merge is done, I suggest merging directly from
zodb-blobs-branch to Zope trunk.  Unless I'm missing something, there
really doesn't seem to be a point to creating another intermediate
branch first.

...

 Yes.  The zodb-blobs-branch can just die after this merge if there's a
 way to get delete branches entirely.

Yes and no ;-)  A branch or a tag in SVN is just another named
directory, with non-mandatory conventions for choosing its path name. 
It can be deleted, like any other directory.  That doesn't get rid of
it entirely, just as no directory can be gotten rid of entirely:  you
can always revert the checkin in which it was deleted, and then it
will magically reappear.  Unlike as under CVS, though, deleted
branches don't keep punching you in the face if you don't go out of
your way to find them.  For example, these are all the visible ZODB
branches today:

$ svn list svn://svn.zope.org/repos/main/ZODB/branches
3.3/
3.4/
3.5/
blob-merge-branch/
ctheune-blobsupport/

Note that none of the other branches we created at the ZODB sprint, or
most of the branches created since then, still show up (I deleted them
after merging to then-current ZODB trunk).  SVN is very nice this way!

 If there is to be a long-lived branch, it will be the blob-merge-branch of 
 ZODB.

Afraid so, yes.  Is it time to delete the ctheune-blobsupport branch?

 Given that Zope 2.9 is not going to ship with blob support due to
 feature freeze, I think this means that we have until May to allow the
 blob-merge-branch to get utterly out of sync with the ZODB trunk.  We
 can then easily wait until, say, the last week in April to worry about
 issues caused by that desynchronization.  The work necessary to remerge
 should provide just the appropriate amount of delay to allow blobs to
 miss the next major Zope release. ;-)

Excellent!  I'm glad you're thinking hard about this -- it gets hard
delaying release after release all by myself ;-)
___
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: [Zope-CMF] Re: RestrictedPython, TALES Expressions and CMF

2005-10-19 Thread Dieter Maurer
Tres Seaver wrote at 2005-10-16 14:22 -0400:
 ...
 Probably, because they can bind the DTML namespace...

I knew that they *could* bind it;  it just don't understand why anyone
would *want* that feature, given the availability of the other,
non-ambiguous bindings.

I know that I used it intensively in the past (for a former
employer). Now, I almost dropped DTML and with it the DTML namespace
bindung of Python Scripts, although it works as well with
the ZPT namespace...

I would argue that it is a misfeature, especially given the bug which it
surfaces in 'render' / 'call_with_ns'.

I have seen this several times:

  When a bug comes to the surface, a feature is reclassified
  as a misfeature...

I do not need this feature (unlike other reclassified things)
but maybe, fixing the bug is also a solution?



=nIvs
-END PGP SIGNATURE-

-- 
Dieter
___
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] Mountpoints

2005-10-19 Thread Tim Peters
[Chris McDonough]
 There is a wrinkle about performing this merge that eluded my memory
 until now.

 To support multidatabases within Zope, it was reasonable to change
 ZODB.config.ZODBDatabase to support the heretofore
 likely-unused-by-real-world-code databases and database_name options
 that may now be passed into ZODB.DB's constructor:

 http://svn.zope.org/ZODB/branches/blob-merge-branch/src/ZODB/config.py?rev=38626r1=38574r2=38626

 The current blob-merge-branch code depends on this change being
 available in the ZODB revision it uses.  In case you're interested, the
 code that actually makes use of this feature in the zodb-blobs-branch is
 in the Zope2.datatypes.DBTab.getDatabase method.

 Is this change acceptable for a merge into the ZODB HEAD?

Turns out that a release of Zope3 has already been made that supports
multidatabases, and I'd naturally prefer to follow the lead of a Zope
that's already out there.  Jim showed me the Zope3 implementation code
and an example today.  I found the code easily (on Zope3 trunk), but
can't for the life of me find anything there that looks like his
example.  Jim, where is that?

The Zope3 code in question is in

src/zope/app/appsetup/appsetup.py

function multi_database().  Note that they didn't change any ZODB
files, instead they give values to a DB's .databases and
.database_name attributes after constructing the DB.  While that might
be questionable in general cough, the implementation of
multidatabases was meant to be both concrete and public.  It's not an
accident that ZODB's tutorial tests/multidb.txt doctest explains and
exploits details of the concrete implementation -- it's not meant to
be abstract.  IOW, poking in new values for these attributes isn't
considered to be evil.

I believe (here's where the example I can't find would nail it) they
use the name on a zodb section as the DB's database_name.  Fred
points out that ZConfig section names are case-insensitive, forced to
lowercase, so that

zodb CHRIS

and

zodb cHris

have the same name.  That's not ideal, and threading these attributes
throughout ZODB's config.py instead (as you did) would be a sane way
to worm around that.

But for right now, I think doing it differently than Zope3 does it
would cause needless confusion more than it would help.  Enhancing
Zope3 and Zope 2.9 in the same way(s) here could make sense.

Some mechanics:  if we do need to make changes, ya, ZODB trunk is the
place to do it.  Work on the branch should use ZODB trunk now.  When
that's as ready to go as it's going to get, let me know and I'll make
an internal release of ZODB 3.6 so we can use a ZODB tag before
merging into Zope trunk.  (An internal release just means I update
ZODB's NEWS.txt, fiddle version numbers and dates in umpteen places,
and make a tag so other projects can use that -- it's the tag that's
important here; an internal release does not involve making tarballs,
Windows installers, announcements (etc), so it's much cheaper and goes
much faster (minutes vs hours) than making a public release.)
___
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: [ZWeb] Re: [Zope.org-internal] Re: [Zopeorg-webmaster] Downloadof Zope 2.8.3 is not possible

2005-10-19 Thread Jim Fulton

Andrew Sawyers wrote:

Ok guys.

I'm willing to eat a little crow on this one.  I blame it on being on a lap
top on prone to mucho interruptions (excuse mode off).  The condition for
this was actually more then the response I originally thought.  When a
unauthorized page is accessed on zope.org - you get a 302 to a require_login
script, which in turn does a 302 to the login form.  The below was the
response from the final redirect - not the initial one!  The initial
redirect actually has a cache hitthus the problem was obvious.  The page
which generated the intial redirect was a file system skin, which is cache
policy manager aware - and thus was getting the default policy applied.  As
of now, zope.org caches nothing explicity in the cache policy manager EXCEPT
for .css and .js files.  The squid servers explicitly are configured to NOT
cache pages rendered by zope which do not have explicit cache headers
already set.  So, any further weird caching should be traceable to the
various ram caches and/or httpd accelerated caches in the zope.org site and
not attributable to the framework cache policy or squid itself.


We are caching the release files themselves. I hope.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope-web maillist  -  Zope-web@zope.org
http://mail.zope.org/mailman/listinfo/zope-web


Re: [ZWeb] Re: [Zope.org-internal] Re: [Zopeorg-webmaster] Download of Zope 2.8.3 is not possible

2005-10-19 Thread Jim Fulton

Sidnei da Silva wrote:

On Wed, Oct 19, 2005 at 03:25:11PM -0400, Jim Fulton wrote:
| - The product product has the *insane* policy that if any files aren't
|   published, the entire product is inaccessible.
| 
|   Does anyone know how to fix this? Is there a knob for this somewhere in

|   CMF?

I don't think that's a CMF 'feature', unless the product is using
'contentValues()' which is part of the CMF API.

I'm sure that's an easy fix.


Can you give us a hint of how to fix it?  Is it a knob somewhere?
A DTML script? ;)

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope-web maillist  -  Zope-web@zope.org
http://mail.zope.org/mailman/listinfo/zope-web


Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-19 Thread Anders Bruun Olsen
On Tue, Oct 18, 2005 at 08:47:23PM -0500, J Cameron Cooper wrote:
 error_log is by default set to ignore three common types of exceptions. 
 You should remove NotFound from the list if you're getting NotFound 
 exceptions and want to see them.
 Ahhh.. Thanks, now I have a traceback, unfortunately it didn't make it any
 more clear to me what the problem is.
 Traceback (innermost last):
   Module ZPublisher.Publish, line 104, in publish
   Module ZPublisher.BaseRequest, line 355, in traverse
   Module ZPublisher.HTTPResponse, line 651, in debugError
 In Zope 2.7, I see that line raising a debug error. Why it doesn't get 
 through I don't know, but here's what it says::
  The object at %s has an empty or missing  \
  docstring. Objects must have a docstring to be  \
  published. % URL
 That should help you, I think. All Zope objects that are to be published 
 to the web must have a docstring.

Thanks, but I do have a docstring on the __getitem__ in question.
This error is really starting to annoy me :-/.
If I return a custom object (i.e. a SimpleItem based class instance)
from __getitem__ it works fine, but if I return a PageTemplateFile
instance it screws up.

-- 
Anders
-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCS/O d--@ s:+ a-- C++ UL+++$ P++ L+++ E- W+ N(+) o K? w O-- M- V
PS+ PE@ Y+ PGP+ t 5 X R+ tv+ b++ DI+++ D+ G e- h !r y?
--END GEEK CODE BLOCK--
PGPKey: 
http://random.sks.keyserver.penguin.de:11371/pks/lookup?op=getsearch=0xD4DEFED0
___
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 )


Re: [Zope] A Flash file in Zope262

2005-10-19 Thread Chris Withers

J Cameron Cooper wrote:

GAYOT Philippe SZSIC35 - BOM wrote:

I want to show a Flash file in my home's page under ZopeCMF 262. Could 
anyone tell me the best way to do that ?


It is precisely no different from the way you would do it with any other 
web server, except that the Flash movie comes from a File rather than a 
file.


Just to note though: 2.6.2 is a pretty ancient version of Zope now, you 
should really think about upgrading...


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
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 )


Re: [Zope] Display images stored in Relational DB

2005-10-19 Thread Chris Withers

Thomas G. Apostolou wrote:

I have an External Method GetPrList witch is connected to a python
module that reads like this


You really want to be uxing mxODBC and it's Zope DA...


X.SODATA is jpg stored in SQL 2K in a field degined as  [SODATA] [image]
NULL


Bleugh... binary data in RBDs suck :-(


The problem is that i get a pythonw.exe Debug-Send Error Report-Don't
Send window and zope server breaks down. ( yes i use windows Xp Pro,
Zope 2.7.0, Python 2.3.3)


Sorry, that made no sense.

I suspect you need to have the template above generate a link to another 
method which actually returns the image data, sets content disposition, 
etc. All pretty yucky stuff...


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
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 )


Re: [Zope] Zope Debugger lets WingDbg fail to connect toclient

2005-10-19 Thread Chris Withers

Stephan Deibel wrote:
You can turn on and off debugging from the WingDBG control panel 
which installs/removes the tracer hook and also the monkey 
patches.  When off, it's the same as if no debugger were running 
(except that WingDBG lets you turn it on again dynamically).


Is the WingDBG control panel in Zope or in WingIDE?
Where's the code which does this turning off and turning on?


Also, someone mentioned changing the monkey patch to call inherited.


Not sure what you mean by that...


I meant trying to call the inherited/replaced method to do the
work or more of the work rather than completely replacing it.  
This *might* make things less brittle (but I doubt it, actually

;-).


Well, it's more than you may want to call the method you're replacing 
when you're monkey patched method is done doing what it's doing. zdb 
does this with prettymuch all its monkeypatches...


The old/existing impl adds a ##'ed comment block to scripts and 
ends up stripping the block before compiling the script so that
line numbers in the code object don't match up with the copy of 
the script that has the ##'s (which is what anyone reading from 
the file system will see).  The patch changes this to compile

the script w/ the ##'ed comment in place.


Yes, but this stuff isn't necessary ;-)
(and has nothing to do with the code that patches co_filename, right?)


Re: patching Zope + CMF:  It should be possible to patch CMF so
that it can run w/ either patched or unpatched Zope.  The author
of CMFFormController accepted our patch when it was originally
submitted and did that.


Odd. You earlier suggested you wanted to get Zope changed to 
co_filename was meaningful. That change also needs to be made in 
FSPythonScript. That one small change is the only thing I'm talking 
about ;-)



Hmm, so perhaps reworking the patch for CMF to work like that
might help get it accepted... then the question is whether the
Zope patch can be made to work w/ unpatched CMF (if that is an
issue; or is it OK for Zope to change under CMF?).


The two should have nothing to do with each other...


As far as a standard for co_filename it should be the full path
file name for FS scripts (O/W most debuggers won't work out of
the box), 


Well, you see, that doesn't work for me ;-)
(Since I tried both FSPythonScripts and PythonScripts in the same way, 
and that uses their full ZODB path)


We'll try to do actual work on this (rather than sending emailed 
drivel ;-) after Wing 2.0.4 is out.  Unfortunately, we've got 
various things going on that has left us w/ very little extra 
time for the next month or so.


You might start by actually getting to know how zdb works, there's very 
little code in it and it tackles the problem in a different way which 
avoids all the trouble you're getting into above...


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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 )


Re: [Zope] database connections from external method

2005-10-19 Thread Tino Wildenhain

Vangelis Mihalopoulos schrieb:


Hi,

I want an external method to access a mysql database on each call. For 
now, i open up a new connection on every call, but this probably won't 
scale much either on performance (new connection on each call is quite 
an overhead) or availability (the number of open connections is 
restricted).


I am thinking of using a Z Database Connection (mysql) from within an 
external method, without using Z SQL Methods, but can't figure out how i 
can safely do it... It crossed my mind to take a peek to the Z SQL 
Method source, but i don't know if such an approach would be thread safe...




The threading is handled by the ZDA, so you can use query() or what
the method actually is. Otoh, what do you think you gain from
circumventing ZSQL Methods?

Regards
Tino
___
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 )


Re: [Zope] database connections from external method

2005-10-19 Thread Vangelis Mihalopoulos


Tino Wildenhain wrote:


The threading is handled by the ZDA, so you can use query() or what
the method actually is.


I couldn't find a method like that... any hints?


Otoh, what do you think you gain from
circumventing ZSQL Methods?


Well, i am running zope under root privileges in read-only mode. If 
there is a Zope break-in, i want to minimize interference with the database.
Also, since this will be a commercial product, keeping most of the code 
in compiled python scripts is meaningful.

___
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 )


Re: [Zope] database connections from external method

2005-10-19 Thread Jens Vagelpohl

Otoh, what do you think you gain from
circumventing ZSQL Methods?



Well, i am running zope under root privileges in read-only mode.  
If there is a Zope break-in, i want to minimize interference with  
the database.
Also, since this will be a commercial product, keeping most of the  
code in compiled python scripts is meaningful.


Umh, no, it's not. Don't fool yourself thinking that deliverying .pyc  
or .pyo files is in any way meaningful or safe or both. It's not.  
They can be decompiled, easily.


jens

___
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] Showing image field from SQL Server 2K

2005-10-19 Thread Thomas G. Apostolou
How can i show image field from SQL Server 2K?
Do i have to select and show it with a special way?

Thomas G. Apostolou
Software Engineer
Θωμάς Γ. Αποστόλου
Μηχανικός Λογισμικού

___
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 )


Re: [Zope] write file to FS (LocalFS?)

2005-10-19 Thread Chris Withers

Rakotomandimby Mihamina wrote:

I am on a unix-like operating system, Zope 2.8, CMF, CPS (SVN Trunk).
I would like users to be abble to write some file on the filesystem.


Why?

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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 )


Re: [Zope] write file to FS (LocalFS?)

2005-10-19 Thread Rakotomandimby Mihamina
On Wed, 2005-10-19 at 13:44 +0100, Chris Withers wrote:
 Rakotomandimby Mihamina wrote:
  I am on a unix-like operating system, Zope 2.8, CMF, CPS (SVN Trunk).
  I would like users to be abble to write some file on the filesystem.
 Why?

I manage a group of users on a Unix system.
They also have an FTP space, and a mailbox (on the system)
They are members of the CPS hosted on the Zope.
They want to change their FTP/POP/IMAP password.

I need to process their request into a batch file.

Obviuosly, ther is the LDAP common authentication for the groupware and
the system, but the LDAP connection is a work still in progress... they
want to change their passwords NOW. The quickest way I found is to code
an interface (a form) in wich they ask for the password change.
-- 
Administration  Formation à l'administration
de serveurs dédiés:
http://www.google.fr/search?q=aspo+infogerance+serveur

___
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 )


Re: [Zope] Showing image field from SQL Server 2K

2005-10-19 Thread Chris Withers

Thomas G. Apostolou wrote:

How can i show image field from SQL Server 2K?
Do i have to select and show it with a special way?


Yes, I already answered you about this earlier:
http://mail.zope.org/pipermail/zope/2005-October/162375.html

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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 )


Re: [Zope] now learning zpt

2005-10-19 Thread Chris Withers

Hi Gary,

Garry Saddington wrote:
Having had a bit of a lambasting over my use of dtml, I have started to 
learn zpt. 


Congratulations, welcome to the zLight ;-)


However, I am curious about the following:
How do you do the equivalent of name=comp.name:records to submit 
multiple values to zsql or to a python script, 


Well, that works exactly as it did before. That stuff is part of Zope's 
publisher machinery and has nothing to do with DTML or ZPT.


especially when the 
initial list is generated dynamically.


Not sure what you mean...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] Pass dtml-var sequence-item as parameter to External Method

2005-10-19 Thread Thomas G. Apostolou

I have an External Method CharSetConv that get a
String_To_Be_Converted, its encoding and the encoding to convert it
to.

I call it like this:
dtml-in sequence-item
tddtml-var expr=CharSetConv(_, 'String_To_Be_Converted',
'ISO-8859-7', 'UTF-8') /td
  /dtml-in
but in the place of 'String_To_Be_Converted' i want to pass dtml-var
sequence-item, and i can not find the way to do so.
i have tried to write it like:
dtml-in sequence-item
tddtml-var expr=CharSetConv(_, 'dtml-var sequence-item',
'ISO-8859-7', 'UTF-8') /td
  /dtml-in
but does not work
Can anyone help please?



Thomas G. Apostolou
Software Engineer
Θωμάς Γ. Αποστόλου
Μηχανικός Λογισμικού

___
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 )


Re: [Zope] Pass dtml-var sequence-item as parameter to External Method

2005-10-19 Thread Tino Wildenhain

Thomas G. Apostolou schrieb:

I have an External Method CharSetConv that get a
String_To_Be_Converted, its encoding and the encoding to convert it
to.

I call it like this:
dtml-in sequence-item
tddtml-var expr=CharSetConv(_, 'String_To_Be_Converted',
'ISO-8859-7', 'UTF-8') /td
  /dtml-in
but in the place of 'String_To_Be_Converted' i want to pass dtml-var
sequence-item, and i can not find the way to do so.
i have tried to write it like:
dtml-in sequence-item
tddtml-var expr=CharSetConv(_, 'dtml-var sequence-item',
'ISO-8859-7', 'UTF-8') /td
  /dtml-in
but does not work
Can anyone help please?


Well, DTML sux for a reason ;)

but dtml-in sequence-item makes no sense unless you have list in list.

You dont need an external method to convert between charsets:

dtml-var
   expr=_['sequence-item'].decode('iso-8859-7').encode('utf-8') 

HTH
Tino

___
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 )


Re: [Zope] Pass dtml-var sequence-item as parameter to External Method

2005-10-19 Thread Jonathan


- Original Message - 
From: Thomas G. Apostolou [EMAIL PROTECTED]

I have an External Method CharSetConv that get a
String_To_Be_Converted, its encoding and the encoding to convert it
to.

I call it like this:
dtml-in sequence-item
   tddtml-var expr=CharSetConv(_, 'String_To_Be_Converted',
'ISO-8859-7', 'UTF-8') /td
 /dtml-in
but in the place of 'String_To_Be_Converted' i want to pass dtml-var
sequence-item, and i can not find the way to do so.
i have tried to write it like:
dtml-in sequence-item
   tddtml-var expr=CharSetConv(_, 'dtml-var sequence-item',
'ISO-8859-7', 'UTF-8') /td
 /dtml-in
but does not work


You can't embedded dtml within dtml.  However, this should work:

dtml-var CharSetConv(_,_['sequence-item'])

hth

Jonathan


___
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 )


Re: [Zope] Display images stored in Relational DB

2005-10-19 Thread Thomas G. Apostolou
Αρχικό μήνυμα από  Chris Withers [EMAIL PROTECTED]:

 Thomas G. Apostolou wrote:
  I have an External Method GetPrList witch is connected to a
 python
  module that reads like this
 
 You really want to be uxing mxODBC and it's Zope DA...
 
  X.SODATA is jpg stored in SQL 2K in a field degined as  [SODATA]
 [image]
  NULL
 
 Bleugh... binary data in RBDs suck :-(
 
  The problem is that i get a pythonw.exe Debug-Send Error
 Report-Don't
  Send window and zope server breaks down. ( yes i use windows Xp
 Pro,
  Zope 2.7.0, Python 2.3.3)
 
 Sorry, that made no sense.
 
 I suspect you need to have the template above generate a link to
 another 
 method which actually returns the image data, sets content
 disposition, 
 etc. All pretty yucky stuff...
 
 Chris
 
 -- 
 Simplistix - Content Management, Zope  Python Consulting
 - http://www.simplistix.co.uk

Dear friend thank you for your reply.
I have posted another question (as you saw) in order to show that
i am a newbie and did not understand the part of your answer:
 method which actually returns the image data, sets content
 disposition,
 etc. All pretty yucky stuff...
i mean that i have searched how to make this method which actually
returns the image data, sets content disposition but found nothing.
Do you have any reading to sugest about this?


Thomas G. Apostolou
Software Engineer
Θωμάς Γ. Αποστόλου
Μηχανικός Λογισμικού
___
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] inheriting from SimpleUserFolder's User

2005-10-19 Thread Jürgen Herrmann
hello!

i use the SimpleUserFolder product and derive a MyUser class from it's
included User class, which in turn inherits from BasicUser.

the SimpleUserFolder's User class does neither reimplement
getRolesInContext() nor allowed(). i looked at the source of
BasicUser (lib/python/AccessControl/User.py) and found out that
allowed() does not use the information provided by getRolesInContext().
i found this comment:
# Still have not found a match, so check local roles. We do
# this manually rather than call getRolesInContext so that
# we can incur only the overhead required to find a match.

so if i reimplement getRolesInContext() in MyUser, i'll probably also
have to reimplement allowed() to reflect the possibly added local roles,
right?

regards, jürgen herrmann

ps: looking at the code of allowed() i doubt that the manual checking
of local roles will speed this method up a lot: local roles seem to be
a seldomly used feature, the improvement in speed would only occur if
the object in question was protected by a local role (and not a normal
one). is this enough to justify duplicated code with all of it's
disadvantages)?
___

 XLhost.de - eXperts in Linux hosting 

Jürgen Herrmann
Bruderwöhrdstraße 15b, DE-93051 Regensburg

Fon:  +49 (0)700 XLHOSTDE [0700 95467833]
Fax:  +49 (0)721 151 463027
WEB:  http://www.XLhost.de
___
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 )


Re: [Zope] Pass dtml-var sequence-item as parameter to External Method

2005-10-19 Thread Thomas G. Apostolou
Αρχικό μήνυμα από  Tino Wildenhain [EMAIL PROTECTED]:

 Thomas G. Apostolou schrieb:
  I have an External Method CharSetConv that get a
  String_To_Be_Converted, its encoding and the encoding to convert
 it
  to.
  
  I call it like this:
  dtml-in sequence-item
  tddtml-var expr=CharSetConv(_,
 'String_To_Be_Converted',
  'ISO-8859-7', 'UTF-8') /td
/dtml-in
  but in the place of 'String_To_Be_Converted' i want to pass
 dtml-var
  sequence-item, and i can not find the way to do so.
  i have tried to write it like:
  dtml-in sequence-item
  tddtml-var expr=CharSetConv(_, 'dtml-var
 sequence-item',
  'ISO-8859-7', 'UTF-8') /td
/dtml-in
  but does not work
  Can anyone help please?
 
 Well, DTML sux for a reason ;)
 
 but dtml-in sequence-item makes no sense unless you have list in
 list.
 
 You dont need an external method to convert between charsets:
 
 dtml-var
 expr=_['sequence-item'].decode('iso-8859-7').encode('utf-8') 
 
 HTH
 Tino

Dear friend thanks alot fro your reply.
I do have a lists in list
your sugestion return an error

Site error This site encountered an error trying to fulfill your
request. The errors were: 
Error Type 
AttributeError 
Error Value 
'NoneType' object has no attribute 'decode' 
Request made at 
2005/10/19 17:17:03.485 GMT+3 

what is wrong?




Thomas G. Apostolou
Software Engineer
Θωμάς Γ. Αποστόλου
Μηχανικός Λογισμικού
___
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 )


Re: [Zope] Pass dtml-var sequence-item as parameter to External Method

2005-10-19 Thread Tino Wildenhain

Thomas G. Apostolou schrieb:

Αρχικό μήνυμα από  Tino Wildenhain [EMAIL PROTECTED]:



Thomas G. Apostolou schrieb:


I have an External Method CharSetConv that get a
String_To_Be_Converted, its encoding and the encoding to convert


it


to.

I call it like this:
dtml-in sequence-item
   tddtml-var expr=CharSetConv(_,


'String_To_Be_Converted',


'ISO-8859-7', 'UTF-8') /td
 /dtml-in
but in the place of 'String_To_Be_Converted' i want to pass


dtml-var


sequence-item, and i can not find the way to do so.
i have tried to write it like:
dtml-in sequence-item
   tddtml-var expr=CharSetConv(_, 'dtml-var


sequence-item',


'ISO-8859-7', 'UTF-8') /td
 /dtml-in
but does not work
Can anyone help please?


Well, DTML sux for a reason ;)

but dtml-in sequence-item makes no sense unless you have list in
list.

You dont need an external method to convert between charsets:

dtml-var
   expr=_['sequence-item'].decode('iso-8859-7').encode('utf-8') 

HTH
Tino



Dear friend thanks alot fro your reply.
I do have a lists in list
your sugestion return an error

Site error This site encountered an error trying to fulfill your
request. The errors were: 
Error Type 
AttributeError 
Error Value 
'NoneType' object has no attribute 'decode' 
Request made at 
2005/10/19 17:17:03.485 GMT+3 


what is wrong?


Looks like you have a None object among your strings in the list.
If so, you can either do:

dtml-if sequence-item dtml-var 
expr=_['sequence-item'].decode('iso-8859-7').encode('utf-8') 

/dtml-if

which is the quick  dirty variant, or:
dtml-var expr=(_['sequence-item'] or 
).decode('iso-8859-7').encode('utf-8') 


Which uses a boolean trick.

HTH
Tino

PS: get used to python scripts where this is a lot better
to write



___
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 )


Re: [Zope] Pass dtml-var sequence-item as parameter to External Method

2005-10-19 Thread Thomas G. Apostolou
Αρχικό μήνυμα από  Tino Wildenhain [EMAIL PROTECTED]:

 Thomas G. Apostolou schrieb:
  Αρχικό μήνυμα από  Tino Wildenhain [EMAIL PROTECTED]:
  
  
 Thomas G. Apostolou schrieb:
 
 I have an External Method CharSetConv that get a
 String_To_Be_Converted, its encoding and the encoding to convert
 
 it
 
 to.
 
 I call it like this:
 dtml-in sequence-item
 tddtml-var expr=CharSetConv(_,
 
 'String_To_Be_Converted',
 
 'ISO-8859-7', 'UTF-8') /td
   /dtml-in
 but in the place of 'String_To_Be_Converted' i want to pass
 
 dtml-var
 
 sequence-item, and i can not find the way to do so.
 i have tried to write it like:
 dtml-in sequence-item
 tddtml-var expr=CharSetConv(_, 'dtml-var
 
 sequence-item',
 
 'ISO-8859-7', 'UTF-8') /td
   /dtml-in
 but does not work
 Can anyone help please?
 
 Well, DTML sux for a reason ;)
 
 but dtml-in sequence-item makes no sense unless you have list in
 list.
 
 You dont need an external method to convert between charsets:
 
 dtml-var
 expr=_['sequence-item'].decode('iso-8859-7').encode('utf-8')
 
 
 HTH
 Tino
  
  
  Dear friend thanks alot fro your reply.
  I do have a lists in list
  your sugestion return an error
  
  Site error This site encountered an error trying to fulfill your
  request. The errors were: 
  Error Type 
  AttributeError 
  Error Value 
  'NoneType' object has no attribute 'decode' 
  Request made at 
  2005/10/19 17:17:03.485 GMT+3 
  
  what is wrong?
 
 Looks like you have a None object among your strings in the list.
 If so, you can either do:
 
 dtml-if sequence-item dtml-var 
 expr=_['sequence-item'].decode('iso-8859-7').encode('utf-8') 
 /dtml-if
 
 which is the quick  dirty variant, or:
 dtml-var expr=(_['sequence-item'] or 
 ).decode('iso-8859-7').encode('utf-8') 
 
 Which uses a boolean trick.
 
 HTH
 Tino
 
 PS: get used to python scripts where this is a lot better
 to write

I agree with you and i would write this in python script (if this was
not an emegerncy and i was not a niewbie)
There one more thing to solve. Not all my elements in the list are
strings. If i was writing python i would use
for i,elem in enumerate(data):
for j,ele in enumerate(elem):
if isinstance(ele,(str,unicode)):
print unicode(ele,'iso-8859-7').encode('utf-8')
what is the corresponding dtml-if to check if sequence-item is a
string?

THANK YOU VERY MUCH ALLREADY!!!



Thomas G. Apostolou
Software Engineer
Θωμάς Γ. Αποστόλου
Μηχανικός Λογισμικού
___
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 )


Re: [Zope] Pass dtml-var sequence-item as parameter to External Method

2005-10-19 Thread Tino Wildenhain

...

which is the quick  dirty variant, or:
dtml-var expr=(_['sequence-item'] or 
).decode('iso-8859-7').encode('utf-8') 


Which uses a boolean trick.

HTH
Tino

PS: get used to python scripts where this is a lot better
to write



I agree with you and i would write this in python script (if this was
not an emegerncy and i was not a niewbie)
There one more thing to solve. Not all my elements in the list are
strings. If i was writing python i would use
for i,elem in enumerate(data):
for j,ele in enumerate(elem):
if isinstance(ele,(str,unicode)):
print unicode(ele,'iso-8859-7').encode('utf-8')
what is the corresponding dtml-if to check if sequence-item is a
string?


there is same_type to check. But you could just do:

dtml-var expr=str(_['sequence-item'] or 
).decode('iso-8859-7').encode('utf-8') 


basically turn everything into a string.

___
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 )


Re: [Zope] Pass dtml-var sequence-item as parameter to External Method

2005-10-19 Thread Thomas G. Apostolou
Αρχικό μήνυμα από  Tino Wildenhain [EMAIL PROTECTED]:

 ...
 which is the quick  dirty variant, or:
 dtml-var expr=(_['sequence-item'] or 
 ).decode('iso-8859-7').encode('utf-8') 
 
 Which uses a boolean trick.
 
 HTH
 Tino
 
 PS: get used to python scripts where this is a lot better
 to write
  
  
  I agree with you and i would write this in python script (if this
 was
  not an emegerncy and i was not a niewbie)
  There one more thing to solve. Not all my elements in the list are
  strings. If i was writing python i would use
  for i,elem in enumerate(data):
  for j,ele in enumerate(elem):
  if isinstance(ele,(str,unicode)):
  print unicode(ele,'iso-8859-7').encode('utf-8')
  what is the corresponding dtml-if to check if sequence-item is a
  string?
 
 there is same_type to check. But you could just do:
 
 dtml-var expr=str(_['sequence-item'] or 
 ).decode('iso-8859-7').encode('utf-8') 
 
 basically turn everything into a string.
 
 

THATS VERY HELPFULL OF YOU THANKS THANKS THANKS!
NEXT TIME I' M GONNA SAY 
NO I DO NOT KNOW WHEN IT'LL BE READY CAUSE I AM A NIEWBIE AND DON' T
LIKE TO DO THINGS THE DIRTY WAY


Thomas G. Apostolou
Software Engineer
Θωμάς Γ. Αποστόλου
Μηχανικός Λογισμικού
___
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 )


Re: [Zope] now learning zpt

2005-10-19 Thread Garry Saddington

Chris Withers wrote:


Hi Gary,

Garry Saddington wrote:

Having had a bit of a lambasting over my use of dtml, I have started 
to learn zpt. 



Congratulations, welcome to the zLight ;-)


However, I am curious about the following:
How do you do the equivalent of name=comp.name:records to submit 
multiple values to zsql or to a python script, 



Well, that works exactly as it did before. That stuff is part of 
Zope's publisher machinery and has nothing to do with DTML or ZPT.


I now realise this after some reading, sorry for the rubbish question.


especially when the initial list is generated dynamically.



Not sure what you mean...


Again irrelevant now;-)



Chris

Would you also stop using dtml in zsql methods and do the processing of 
multiple records in python?

regards
garry
___
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 )


Re: [Zope] database connections from external method

2005-10-19 Thread J Cameron Cooper

Vangelis Mihalopoulos wrote:


Tino Wildenhain wrote:


The threading is handled by the ZDA, so you can use query() or what
the method actually is.



I couldn't find a method like that... any hints?


It is indeed the 'query' method, which you pass a string with SQL.

It comes from Zope/lib/python/Shared/DC/ZRDB/dbi_db.py, inherited 
through a long path.


You might also look at ExtZSQLMethod.

http://www.zope.org/Members/jccooper/extzsql

--jcc


--
Building Websites with Plone
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.com
___
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] Re: inheriting from SimpleUserFolder's User

2005-10-19 Thread Florent Guillaume

Jürgen Herrmann wrote:

i use the SimpleUserFolder product and derive a MyUser class from it's
included User class, which in turn inherits from BasicUser.

the SimpleUserFolder's User class does neither reimplement
getRolesInContext() nor allowed(). i looked at the source of
BasicUser (lib/python/AccessControl/User.py) and found out that
allowed() does not use the information provided by getRolesInContext().
i found this comment:
# Still have not found a match, so check local roles. We do
# this manually rather than call getRolesInContext so that
# we can incur only the overhead required to find a match.

so if i reimplement getRolesInContext() in MyUser, i'll probably also
have to reimplement allowed() to reflect the possibly added local roles,
right?

regards, jürgen herrmann

ps: looking at the code of allowed() i doubt that the manual checking
of local roles will speed this method up a lot: local roles seem to be
a seldomly used feature, the improvement in speed would only occur if
the object in question was protected by a local role (and not a normal
one). is this enough to justify duplicated code with all of it's
disadvantages)?


Actually all third-party userfolders I know of reimplement allowed() in 
terms of calling getRolesInContext().


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
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 )


Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-19 Thread Dieter Maurer
Anders Bruun Olsen wrote at 2005-10-17 00:59 +0200:
 
Zope has encountered a problem publishing your object.

Cannot locate object at: http://localhost:8080/vitester/asonhe 

This is a NotFound problem.

   Zope is unable to locate vitester/asonhe

Are you sure, vitester/asonhe is there?


Note, that ObjectManager.__getitem__ just locates
its ObjectManager items...

-- 
Dieter
___
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 )


Re: [Zope] database connections from external method

2005-10-19 Thread Dieter Maurer
Vangelis Mihalopoulos wrote at 2005-10-19 12:22 +0300:
 ...
I am thinking of using a Z Database Connection (mysql) from within an 
external method, without using Z SQL Methods, but can't figure out how i 
can safely do it

Calling a DA object gives you a low level connection object (a
db object). It has a query method. Calling it provides
safe SQL execution.


From other posts, I understood that you want to do special things.
In such cases, reading the source is necessary -- and being prepared
that things may change between releases...

I follow the recommendation of others to use ZSQL methods...


-- 
Dieter
___
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 )


Re: [Zope] Deleting objects from an external method

2005-10-19 Thread Dieter Maurer
Nikko Wolf wrote at 2005-10-17 16:21 -0600:
 ...
  File /usr/local/zinstance/Products/CMFPlone/PloneFolder.py, line 
306, in manage_delObjects
raise Unauthorized, (
Unauthorized: Do not have permissions to remove this object

This obviously is the Plone implementation of manage_delObjects --
and it apparently performs an explicit check (unlike Zope's
manage_delObjects).

You should ask Plone related questions on the Plone (and not the
Zope) mailing list. Things can be quite different in Plone land
(as e.g. for manage_delObjects).

-- 
Dieter
___
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 )


Re: [Zope] inheriting from SimpleUserFolder's User

2005-10-19 Thread Dieter Maurer
Jürgen Herrmann wrote at 2005-10-19 15:34 +0200:
i use the SimpleUserFolder product and derive a MyUser class from it's
included User class, which in turn inherits from BasicUser.

the SimpleUserFolder's User class does neither reimplement
getRolesInContext() nor allowed(). i looked at the source of
BasicUser (lib/python/AccessControl/User.py) and found out that
allowed() does not use the information provided by getRolesInContext().
i found this comment:
# Still have not found a match, so check local roles. We do
# this manually rather than call getRolesInContext so that
# we can incur only the overhead required to find a match.

so if i reimplement getRolesInContext() in MyUser, i'll probably also
have to reimplement allowed() to reflect the possibly added local roles,
right?

Yes.

 ...
ps: looking at the code of allowed() i doubt that the manual checking
of local roles will speed this method up a lot: local roles seem to be
a seldomly used feature, the improvement in speed would only occur if
the object in question was protected by a local role

Be careful about terminology! Objects are not protected by roles
(but by permissions).

You gain something if a near local role grants the necessary
permission.
The Owner local role tends to be very near.

Thus, you may gain, when usually owners try to execute protected
methods.

(and not a normal
one). is this enough to justify duplicated code with all of it's
disadvantages)?

Nobody prevents you to implement your allowed by means
of getRolesInContext.

-- 
Dieter
___
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] Re: Hello

2005-10-19 Thread Pierre Thibault

Andrew Milton a écrit :


+---[ Pierre Thibault ]--
| Hello,
| 
| Is someone reading this message?


Yes.

 


Hello Andrew  all,

I am new to Zope. So I would like to learn. On the Zope website it is 
written to do the tutorials bundle with the Zope installation but where 
are they? After installation, I was unable to find them.


I also plan to learn Plone after Zope, is it a good path?

I also ran zopetest after my install and I have the following error:


Failure in test testUmask (zdaemon.tests.testzdrun.ZDaemonTests)
Traceback (most recent call last):
  File 
/Users/pierreth/Download/Zope-3.1.0/build/lib.darwin-8.2.0-Power_Macintosh-2.3/zdaemon/tests/testzdrun.py, 
line 260, in testUmask
  File 
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/unittest.py, 
line 278, in failUnless

if not expr: raise self.failureException, msg
AssertionError

Failure in test testRetryNotAllowed 
(zope.app.publication.tests.test_zopepublication.ZopePublicationErrorHandling)

Traceback (most recent call last):
  File 
/Users/pierreth/Download/Zope-3.1.0/build/lib.darwin-8.2.0-Power_Macintosh-2.3/zope/app/publication/tests/test_zopepublication.py, 
line 177, in testRetryNotAllowed
  File 
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/unittest.py, 
line 302, in failUnlessEqual

raise self.failureException, \
AssertionError: 'line 167, in testRetryNotAllowed ConflictError: 
database conflict error' != 'in testRetryNotAllowed raise 
ConflictError ConflictError: database conflict error'


--
Ran 6990 tests in 960.010s

FAILED (failures=2)
Running FUNCTIONAL tests from /usr/local/Zope-3.1.0/lib/python


Should I worry?

--

A+


begin:vcard
fn:Pierre Thibault
n:Thibault;Pierre
org;quoted-printable:;D=C3=A9veloppement web et programmation
adr;quoted-printable;quoted-printable:;;95B Rose-De-Lima;Montr=C3=A9al;Qu=C3=A9bec;H4C 2L1;Canada
email;internet:[EMAIL PROTECTED]
title:Programmeur analyste
tel;home:(514) 846-9394
note;quoted-printable:Ce que j'aime:=0D=0A=
	=0D=0A=
	Les gens intelligents.=0D=0A=
	La musique.=0D=0A=
	Les bons vins.=0D=0A=
	La science.=0D=0A=
	La litt=C3=A9rature.=0D=0A=
	Le sport.=0D=0A=
	Programmer (Java, Python, C++ et cie)=0D=0A=
	=0D=0A=
	Ce que je n'aime pas:=0D=0A=
	=0D=0A=
	La stupidit=C3=A9.=0D=0A=
	La futilit=C3=A9 (la mode, regader les spectables sportifs, =C3=A9tendrep=
	arler des vedettes).=0D=0A=
	
version:2.1
end:vcard

___
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] ANN: ZSyncer 0.7-beta2

2005-10-19 Thread Paul Winkler
There were a couple of bugs in beta1.  I've just released beta2.
It also includes a working CMF folder status action for ZSyncerTool
(replacing the useless stub that was there.)

Get it here:
http://sourceforge.net/project/shownotes.php?release_id=364738

About ZSyncer:
ZSyncer is a project that allows live zope objects to be synchronized
from one Zope to another without doing the tedious export / transfer /
import dance. It is very easy to use.
ZSyncer also allows you to see at a glance which objects are out-of-sync,
and view diffs for many types of objects.

-PW

On 10/14/05, Paul Winkler [EMAIL PROTECTED] wrote:
 Hi folks,

 Anybody who's been wanting to get ZSyncer working on Zope 2.8,
 please check out the new 0.7-beta1 on sourceforge:
 http://sourceforge.net/project/showfiles.php?group_id=28073package_id=20913release_id=363376

 This is a beta release!
 I'm hoping for feedback from anybody who is using any of the
 following: Zope 2.8+, CMF 1.5+, and/or ZClasses.

 Changes from previous release can be read here:
 http://sourceforge.net/project/shownotes.php?release_id=363376

--
http://www.slinkp.com
___
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 )


Re: [Zope-DB] DB2 timestamp fields problem - server crashes

2005-10-19 Thread Gergana Silvanova
Hi Chris,

I am using the Zope DB2 adapter from Blue Dynamics
(ZDB2DA).

Best wishes,
Iliyana



--- Chris Withers [EMAIL PROTECTED] wrote:

 Gergana Silvanova wrote:
  I have problems with Zope and IBM DB2.
  
  Seems like, when I select timestamp fields from
 the
  DB2 database, the Zope server behaves
 inpredictably -
  sometimes crashes, sometimes works ok.
 
 What database adapter are you using?
 
 cheers,
 
 Chris
 
 -- 
 Simplistix - Content Management, Zope  Python
 Consulting
 - http://www.simplistix.co.uk
 




__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] DCOracle2, Oracle 10g and Long data type

2005-10-19 Thread Seth Gottlieb
I have heard that people are successfully using DCOracle2 against Oracle 
 10g.  I was able to get it working but I seem to be getting a Oracle 
error (ORA-21301: not initialized in object mode) when trying to write 
to a Long datatype.  BTW, I am using dtml-sqlvar type 'string' in my SQL 
statements.


Thanks,

Seth

--
Seth Gottlieb
Optaros, Inc.
60 Canal Street
Boston, MA 02114
e: [EMAIL PROTECTED]
v: 617.227.1855 ext. 107
f: 617.227.1755
m: 617.852.2956
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db