Re: [Zope-dev] Unittests with different zope configuration?

2006-06-07 Thread Stefan H. Holek

I use this to set debug-mode off:

# Switch off debug mode
import App.config
config = App.config.getConfiguration()
config.debug_mode = 0
App.config.setConfiguration(config)

Stefan


On 5. Jun 2006, at 11:50, Andreas Jung wrote:

Does anyone know how to write unittests that have to deal with  
different configurations in zope.conf? In my particular case I need  
write some tests for sequence.sort() that deal with the 'locale'  
configuration in zope.conf.

So how do I setup a different configurations in a unit test?

Andreas


--
Anything that happens, happens.  --Douglas Adams


___
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: Unittests with different zope configuration?

2006-06-07 Thread Rocky Burt
On Wed, 2006-07-06 at 12:04 +0200, Stefan H. Holek wrote:
 I use this to set debug-mode off:
 
  # Switch off debug mode
  import App.config
  config = App.config.getConfiguration()
  config.debug_mode = 0
  App.config.setConfiguration(config)

Oh wow, this trick should come in handy.  Thanks Stefan!

- Rocky

-- 
Rocky Burt
ServerZen Software -- http://www.serverzen.com
News About The Server (blog) -- http://www.serverzen.net



signature.asc
Description: This is a digitally signed message part
___
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] Re: Unittests with different zope configuration?

2006-06-07 Thread Andreas Jung



--On 7. Juni 2006 08:50:41 -0230 Rocky Burt [EMAIL PROTECTED] wrote:


On Wed, 2006-07-06 at 12:04 +0200, Stefan H. Holek wrote:

I use this to set debug-mode off:

 # Switch off debug mode
 import App.config
 config = App.config.getConfiguration()
 config.debug_mode = 0
 App.config.setConfiguration(config)


Oh wow, this trick should come in handy.  Thanks Stefan!



Cheers to Mr. Testing

Andreas

pgp6NtMNQBjHI.pgp
Description: PGP signature
___
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: Unittests with different zope configuration?

2006-06-07 Thread Florent Guillaume

Stefan H. Holek wrote:

I use this to set debug-mode off:

# Switch off debug mode
import App.config
config = App.config.getConfiguration()
config.debug_mode = 0
App.config.setConfiguration(config)


The setConfiguration() is probably unnecessary, you're modifying a mutable 
datastructure.


Florent

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

2006-06-07 Thread Andreas Jung



--On 7. Juni 2006 14:28:03 +0200 Florent Guillaume [EMAIL PROTECTED] wrote:


Stefan H. Holek wrote:

I use this to set debug-mode off:

# Switch off debug mode
import App.config
config = App.config.getConfiguration()
config.debug_mode = 0
App.config.setConfiguration(config)


The setConfiguration() is probably unnecessary, you're modifying a
mutable datastructure.


Probably unnecessary but one should not depend on an implementation
detail in this case.

-aj

pgpTts7ZTWOGr.pgp
Description: PGP signature
___
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: Unittests with different zope configuration?

2006-06-07 Thread Florent Guillaume

Zope core doesn't use the legacy locations anymore however, right?
It would potentially impact only third-party products?

Florent

On 7 Jun 2006, at 14:47, Stefan H. Holek wrote:

It is needed to update legacy locations, e.g. copying  
config.instancehome to the INSTANCE_HOME built-in and into the  
environment. The debug_mode flag has a legacy location of  
Globals.DevelopmentMode.


Cheers,
Stefan

On 7. Jun 2006, at 14:28, Florent Guillaume wrote:


Stefan H. Holek wrote:

I use this to set debug-mode off:
# Switch off debug mode
import App.config
config = App.config.getConfiguration()
config.debug_mode = 0
App.config.setConfiguration(config)


The setConfiguration() is probably unnecessary, you're modifying a  
mutable datastructure.


Florent


--
Anything that happens, happens.  --Douglas Adams




--
Florent Guillaume, Nuxeo (Paris, France)   Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]


___
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] Re: zope2 requests VS zope3 requests

2006-06-07 Thread Philipp von Weitershausen
Stefan H. Holek wrote:
 -1
 
 The whole point of sticking with Zope2 is backward compatibility, isn't
 it? If I wanted something that doesn't run my old products and
 applications anymore I would go to Zope3 directly, why thank you.

Hey, the idea isn't to run Zope 3 directly but to evolve, remember? How
can we evolve if we don't ever change anything? Of course we'll provide
BBB for the usual amount of time.

 Please keep this in mind in your spree to make Zope2 look like Zope3.
 Backward compatibility is paramount.

Of course, but not forever. Eternal backward compatibility (even with
Zope 1) has lead to what Zope 2 and its various bit-rotten APIs are
today. Is it such a surprise then that Zope 3 ended up being a complete
rewrite because people realized early on that it was just way too hard
to satisfy all those weird quirks in Zope 2? Well, it turns out that we
do want to evolve Zope 2, so now we're doing all that work in cleaning
up the mess.

The amount of time I alone have spent in debugging Zope 2 because it
eats exceptions, magically acquires things or excepts this or that is
just ridiculous. But don't get me wrong, I'm not complaining. I'm just
trying to improve things.

 Next thing you are going to remove implicit acquisition ;-).

Nope :).

 On 28. Mai 2006, at 12:53, Philipp von Weitershausen wrote:
 
 That's true. However, we really want the Zope 2 request to (eventually)
 become like the Zope 3 browser request. In fact, in many places we
 already assume that the Zope 2 request is like a Zope 3 browser request.
 We stick IBrowserRequest on it and hand it over to lots of Zope 3
 machinery. So far this has worked relatively well, but there are
 problems coming up with certain API subtleties.

 I think the biggest challenge will be to deprecate __getattr__ access
 for request variables and only allow __getitem__ for this. Then, the
 getattr protocol will be used to access the request API only. For
 example, IBrowserRequest demands that requests have a 'debug' attribute.
 In Zope 2, we have the problem that request.debug is an alternate
 spelling of request.form['debug']. If that alternate spelling wasn't
 there, request.debug was free for the IBrowserRequest API. Right now
 we're doing a frame hack to see where the caller is coming from and
 either yield request.debug or request.form['debug'].
___
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-PAS] Re: Bug in ZODBUserManager

2006-06-07 Thread Tres Seaver

Dominique Lederer wrote:

Hello!

I think a found a bug in ZODBUserManager.py in the updateUserPassword
method.

To reproduce:
Add users via ZMI (id | login)
user1 | login1
user2 | login2

Everything works fine.
Now edit the second user (by clicking on password in the
ZODBUserManager ZMI)
And choose login1 without quotes for the login name, retype your
password.

You now see two users in your ZODBUserManager, but only the second one
will work.
The first user is somehow overwritten, you cant delete him, or even
use him for authentification.

I browsed the source (om not so good at that so please forgive if I went
the wrong way ;) )
And found the corresponding method updateUserPassword

I think somewhere in this method the duplicate login check is missing,
like in the method addUser

if self._login_to_userid.get( login_name ) is not None:
raise KeyError, 'Duplicate login name: %s' % login_name

Maybe anyone knows how to fix this :) I do not.

Cheers
Dom


Please try the following patch::

-- 8 ---
--- plugins/ZODBUserManager.py  (revision 68513)
+++ plugins/ZODBUserManager.py  (working copy)
@@ -314,6 +314,10 @@
 old_login_name = self._userid_to_login[ user_id ]

 if old_login_name != login_name:
+
+if self._login_to_userid.get( login_name ) is not None:
+raise KeyError, 'Duplicate login name: %s' % login_name
+
 del self._login_to_userid[ old_login_name ]
 self._login_to_userid[ login_name ] = user_id
 self._userid_to_login[ user_id ] = login_name
-- 8 ---

If it works, then please submit it along with your problem report to the 
PAS collector:


  http://www.zope.org/Collectors/PAS/

(Actually, please submit the issue even if the patch doesn't work).


Tres.
--
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com

___
Zope-PAS mailing list
Zope-PAS@zope.org
http://mail.zope.org/mailman/listinfo/zope-pas


Re: [Zope] debug with ipython

2006-06-07 Thread thomas desvenain

thanks ! and is it possible to run zope in console mode (as debug
mode) whithout having to shutdown the server (to unlock ZODB) ?

2006/6/7, Timur Izhbulatov [EMAIL PROTECTED]:

On Tue, Jun 06, 2006 at 04:12:40PM +0200, thomas desvenain wrote:
 is it possible to use zopectl debug with ipython ?

You just need to import IPython and start the shell
http://mail.zope.org/pipermail/zope/2004-September/153667.html

--
Timur Izhbulatov
OILspace, 26 Leninskaya sloboda, bld. 2, 2nd floor, 115280 Moscow, Russia
P:+7 495 105 7245 + ext.205 F:+7 495 105 7246 E:[EMAIL PROTECTED]
Building Successful Supply Chains - One Solution At A Time.
www.oilspace.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] creating a new permission

2006-06-07 Thread thomas desvenain

hello,

i am searching for hours, and i don't find how to define a new
permission, in python code, for my product

can you help me ?

thanks

thomas
___
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] creating a new permission

2006-06-07 Thread Andreas Jung
Look at the e.g. at the PloneCollectorNG sources..it defines new roles and 
permissions.


-aj

--On 7. Juni 2006 09:53:10 +0200 thomas desvenain 
[EMAIL PROTECTED] wrote:



hello,

i am searching for hours, and i don't find how to define a new
permission, in python code, for my product

can you help me ?

thanks

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




--
ZOPYX Ltd.  Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope  Plone development, Consulting


pgplEDWljHLVI.pgp
Description: PGP signature
___
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] creating a new permission

2006-06-07 Thread Martin Aspeli


thomas desvenain wrote:
 
 i am searching for hours, and i don't find how to define a new
 permission, in python code, for my product
 

Permissions kind of spring into existence when they are used. For example,
Poi defines some additional permissions in Products/Poi/permissions.py. It
then calls setDefaultRoles() to set the default roles of each permission.
When these are used e.g. in security.declareProtected() statements around
methods, they become available in the ZMI.

Martin
--
View this message in context: 
http://www.nabble.com/creating-a-new-permission-t1746362.html#a4748103
Sent from the Zope - General forum at Nabble.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] debug with ipython

2006-06-07 Thread Bakhtiar A Hamid

On 6/7/06, thomas desvenain [EMAIL PROTECTED] wrote:

thanks ! and is it possible to run zope in console mode (as debug
mode) whithout having to shutdown the server (to unlock ZODB) ?


zeo is the magic word here.  check on how to enable zeo from the
zopebook at plope.com, or google for it

--
http://myzope.kedai.com.my - my-zope org
___
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] creating a new permission

2006-06-07 Thread Sascha Welter
(Wed, Jun 07, 2006 at 12:00:10PM -0400) [EMAIL PROTECTED] wrote/schrieb/egrapse:
 From: thomas desvenain [EMAIL PROTECTED]
 
 i am searching for hours, and i don't find how to define a new
 permission, in python code, for my product

Something I wrote a while ago, Introduction to some Zope security 
settings:
http://betabug.ch/blogs/ch-athens/196

Regards,

Sascha

-- 
About the record changer:
Those with an all-LP collection will not want it (the man who is too
lazy to change records every 25 minutes is too lazy to live)...
   Excerpt from the book Hi-Fi All-New 1958 Edition
___
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] RE: zope LDAP deadlock problem

2006-06-07 Thread Dieter Maurer
Matthew X. Economou wrote at 2006-6-6 14:44 -0400:
 ...
In short, no, Zope will consume all available CPU cycles after some amount of 
idle time, due to a threading-related flaw in Zope, GRUF, Plone, 
LDAPUserFolder, python-ldap, or OpenLDAP (I don't know which).

You can use Florent's DeadlockDebugger to find out what happens.



-- 
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] Document parameters as part of a URL

2006-06-07 Thread Andrew Hedges

Just curious what people think of the technique described here:

   http://www.zope.org/Members/petrvanblokland/parameters_in_url

This page is a few years old.  Is there something built-in to more  
recent versions of Zope that does this already?  If there is, Google  
has failed me on this one.


The context is that I'm working on a DTML (yeah, yeah ... I know)  
application in Zope 2.9.2 and want to be able to build URLs like this:


   http://server.domain/members/44

...where members is a DTML Method and 44 is a user_id I could do  
things with, like call a ZSQL method.  I'd prefer that members is a  
DTML Method and not a Python script or ZSQL Method.


Thanks in advance for any insights!

-Andrew
-
Andrew Hedges, [EMAIL PROTECTED]
http://clearwired.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] RE: zope LDAP deadlock problem

2006-06-07 Thread Matthew X. Economou
 You can use Florent's DeadlockDebugger to find out what happens.

This is true for someone with the requisite skills and plenty of time.
In my case, the actual deadlock happens in a system library routine
(sigaction, as I recall), making the identification of the component
that's actually at fault rather challenging for someone like me.
Fortunately, something in FreeBSD's threading implementation must have
changed between RELENG_5 and RELENG_6, because Zope doesn't become
completely unresponsive now.

Best wishes,
Matthew

-- 
jsoffron: I'm generally pretty high on national defense...
Mr. Bad Example: Careful...it's a gateway policy. Before you know it,
 you'll be mainlining the hard stuff like trade agreements.
jsoffron: Too late...I've been freebasing Nafta all day... Sweet,
 sweet NAFTA.
- As seen on Slashdot
___
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] REQUEST within a property() getter/setter

2006-06-07 Thread Doyon, Jean-Francois
Hello,

When executing code within a property getter/setter, I can't seem to get to
the REQUEST object.

self.REQUEST always seems to return Special Object Used to Force
Acquisition ...

Anyway around this?

Jean-François Doyon
Internet Service Development and Systems Support / Spécialiste de
dèveloppements internet et soutien technique
Canada Centre for Remote Sensing/Centre Canadien de télédétection
Natural Resources Canada/Ressources Naturelles Canada
http://atlas.gc.ca
Tel./Tél.: (613) 992-4902
Fax: (613) 947-2410
___
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] [ANN] Zope 2.9.3 released

2006-06-07 Thread Thomas Bennett
I'll have to say, this is the first Zope that I've had a problem with the 
install since 1998.  The last successful version I installed was 2.92.

RedHat Linux 7.3
Python 2.4.3

I've looked at the Troubleshooting info in the INSTALL.txt file and my 
Makefile for Python 2.4.3 shows 
CC= gcc -pthread
CXX=c++ -pthread
and it was a vanilla build.

It looks like to me that not finding a zcml configuration file it quits.  Any 
ideas how I can fix this?


[z293]# ./configure --with-python=/usr/local/bin/python2.4 --prefix=/varz29

Configuring Zope installation

Using Python interpreter at /usr/local/bin/python2.4

[z293]# make
/usr/local/bin/python2.4 install.py -q build
Traceback (most recent call last):
  File install.py, line 28, in ?
context.initialize()
  File /var/z293/Support/zpkgsetup/setup.py, line 121, in initialize
self.scan(depname, pkgdir, reldir)
  File /var/z293/Support/zpkgsetup/setup.py, line 211, in scan
self.scan_package(name, directory, reldir)
  File /var/z293/Support/zpkgsetup/setup.py, line 225, in scan_package
pkginfo = package.loadPackageInfo(name, directory, reldir)
  File /var/z293/Support/zpkgsetup/package.py, line 101, in loadPackageInfo
pkginfo = read_package_info(directory, reldir)
  File /var/z293/Support/zpkgsetup/package.py, line 166, in 
read_package_info
data_files[:] = expand_globs(directory, reldir, data_files)
  File /var/z293/Support/zpkgsetup/package.py, line 303, in expand_globs
raise ValueError(
ValueError: filename pattern '*-configure.zcml' doesn't match any files
make: *** [build] Error 1



TIA
Thomas





On Friday 12 May 2006 08:32, Andreas Jung wrote:
 From: Andreas Jung [EMAIL PROTECTED]

 Hi all,

 on behalf of Zope Corporation and the Zope community I am pleased to
 announce the release of Zope 2.9.3.

 You can download  it from

   http://www.zope.org/Products/Zope/2.9.3/


 Some new features of Zope 2.9:

   - ZODB 3.6

   - Five 1.3

   - integration for Zope 3 events for object creation and deletion

   - Zope 3 i18n integration for page templates


 For more information on what is new in this release, see the
 CHANGES.txt files for the release:

   http://www.zope.org/Products/Zope/2.9.3/CHANGES.txt


 Please bring all the bugs you have found to the Zope bugtracker:

http://collector.zope.org/Zope:http://collector.zope.org/Zope

 For more information on the available Zope releases, guidance for selecting
 the right distribution and installation instructions, please see:

http://www.plope.com/Books/2_7Edition/InstallingZope.stx


 Support Python versions:

   Zope 2.9 requires Python 2.4.3 (Python 2.4.1, 2.4.2 are still
 acceptable). Older Python versions are no longer supported.


 Thanks to all being involved in this release.

 --
 Andreas Jung(andreas at zopyx dot com)

-- 

Thomas McMillan Grant Bennett   Appalachian State University
Computer Consultant III P O Box 32026
University Library  Boone, North Carolina 28608
(828) 262 6587

An important measure of effort in coding is the frequency with which you write 
something that doesn't actually match your mental representation of the 
problem, and have to backtrack on realizing that what you just typed won't 
actually tell the language to do what you're thinking. -Eric Raymond

Library Systems Help Desk: http://linux.library.appstate.edu/help

___
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] Document parameters as part of a URL

2006-06-07 Thread Peter Bengtsson

I much prefer to use __before_publishing_traverse__.
Eg.

class MyProduct(Something):
 def __before_publishing_traverse__(self, object, REQUEST):
sort things out before publising object 
   stack = REQUEST['TraversalRequestNameStack']
   if len(stack)==2 and stack[0]=='members' and stack[1].isdigit():
   REQUEST.set('member_id', stack[1])
   stack.remove(stack[1])

That's my opinion.

On 6/7/06, Andrew Hedges [EMAIL PROTECTED] wrote:

Just curious what people think of the technique described here:

http://www.zope.org/Members/petrvanblokland/parameters_in_url

This page is a few years old.  Is there something built-in to more
recent versions of Zope that does this already?  If there is, Google
has failed me on this one.

The context is that I'm working on a DTML (yeah, yeah ... I know)
application in Zope 2.9.2 and want to be able to build URLs like this:

http://server.domain/members/44

...where members is a DTML Method and 44 is a user_id I could do
things with, like call a ZSQL method.  I'd prefer that members is a
DTML Method and not a Python script or ZSQL Method.

Thanks in advance for any insights!

-Andrew
-
Andrew Hedges, [EMAIL PROTECTED]
http://clearwired.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 )




--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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] Document parameters as part of a URL

2006-06-07 Thread Andrew Hedges

Peter,

That definitely looks promising.  I've tried a couple of ways, but I  
can't make it so this applies to all DTML Methods.  Any ideas?


-Andrew

On Jun 7, 2006, at  6/7/2006 4:10 PMMDT, Peter Bengtsson wrote:


I much prefer to use __before_publishing_traverse__.
Eg.

class MyProduct(Something):
 def __before_publishing_traverse__(self, object, REQUEST):
sort things out before publising object 
   stack = REQUEST['TraversalRequestNameStack']
   if len(stack)==2 and stack[0]=='members' and stack 
[1].isdigit():

   REQUEST.set('member_id', stack[1])
   stack.remove(stack[1])

That's my opinion.


___
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] Document parameters as part of a URL

2006-06-07 Thread Peter Bengtsson

Well, you could maybe create a new type of DTML Method called Clear
DTML Method which would in principle look something like this:

from zope.somewhere import DTMLMethod
class ClearDTMLMethod(DTMLMethod):
   meta_type = Clear  + DTMLMethod.meta_type
   def __before_publishing_traverse__(...):
   do your stuff
# cross your fingers that it will work

But this restricts you to DTML Methods. So if you change to Page
Templates one day you'll have to recode the url param stuff.


On 6/7/06, Andrew Hedges [EMAIL PROTECTED] wrote:

Peter,

That definitely looks promising.  I've tried a couple of ways, but I
can't make it so this applies to all DTML Methods.  Any ideas?

-Andrew

On Jun 7, 2006, at  6/7/2006 4:10 PMMDT, Peter Bengtsson wrote:

 I much prefer to use __before_publishing_traverse__.
 Eg.

 class MyProduct(Something):
  def __before_publishing_traverse__(self, object, REQUEST):
 sort things out before publising object 
stack = REQUEST['TraversalRequestNameStack']
if len(stack)==2 and stack[0]=='members' and stack
 [1].isdigit():
REQUEST.set('member_id', stack[1])
stack.remove(stack[1])

 That's my opinion.





--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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] Information about Zope 3.2

2006-06-07 Thread John Huttley



Lennart Regebro wrote:

On 6/6/06, Michael Dexter [EMAIL PROTECTED] wrote:

Good FAQ but you do not address the 64k EUR question: Is Zope 3 so
well thought out (separation of content and logic etc.) that is will
not only serve as an excellent application server but also the I
don't know how we survived without it future foundation for Plone,
Silva, CPS etc. CMS's?


Answer: Yes.
:-)


I disagree.

Zope 3 came out 2004-ish and even now there no support for connection to 
Corporate databases via ODBC

on the windows platform.

You can't even buy it from egenix.

That makes its a non-starter for me.

--John
___
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-DB] ZPsycopgDA connection failing

2006-06-07 Thread Davis Mr MR
Hi,

My connection to Postgres keeps failing every couple of hours. I did
read that there was a problem with some versions of this. I'm using
2.0b6 at the moment.

Does anyone have a version number that I can try that will re-establish
a connection on failure.

Cheers
Michael

-- 
This message has been scanned for viruses and
dangerous content by the Cranfield MailScanner, and is
believed to be clean.

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] ZPsycopgDA connection failing

2006-06-07 Thread Charlie Clark

On 2006-06-07 at 16:17:13 [+0200], Davis Mr MR [EMAIL PROTECTED] 
wrote:
 Hi,
 
 My connection to Postgres keeps failing every couple of hours. I did
 read that there was a problem with some versions of this. I'm using
 2.0b6 at the moment.
 
 Does anyone have a version number that I can try that will re-establish
 a connection on failure.

Michael,

if you look at the DA (db.py) source you will see that it actually tries to 
reconnect if no connection is available so the problem must be somewhere 
else. PostgreSQL connections themselves don't timeout but if the database 
is on a network and the connection is dropped then the DA may well think it 
is connected when it isn't. This is difficult to solve in the DA and you 
need to know why the connection is being dropped first.

Charlie
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


RE: [Zope-DB] ZPsycopgDA connection failing

2006-06-07 Thread Davis Mr MR
Hi Charlie,

I was afriad of that. Looks like the firewall is killing it, and it is
not telling the DA.

Will need to speak to our network people.

Thanks for your help.
Cheers
Michael 

-Original Message-
From: Charlie Clark [mailto:[EMAIL PROTECTED] 
Sent: 07 June 2006 15:53
To: Davis Mr MR
Cc: zope-db@zope.org
Subject: Re: [Zope-DB] ZPsycopgDA connection failing


On 2006-06-07 at 16:17:13 [+0200], Davis Mr MR
[EMAIL PROTECTED]
wrote:
 Hi,
 
 My connection to Postgres keeps failing every couple of hours. I did 
 read that there was a problem with some versions of this. I'm using
 2.0b6 at the moment.
 
 Does anyone have a version number that I can try that will 
 re-establish a connection on failure.

Michael,

if you look at the DA (db.py) source you will see that it actually tries
to reconnect if no connection is available so the problem must be
somewhere else. PostgreSQL connections themselves don't timeout but if
the database is on a network and the connection is dropped then the DA
may well think it is connected when it isn't. This is difficult to solve
in the DA and you need to know why the connection is being dropped
first.

Charlie

-- 
This message has been scanned for viruses and
dangerous content by the Cranfield MailScanner, and is
believed to be clean.

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] Multiple databases connection

2006-06-07 Thread Infor Gates
Dear listMy organisation received databases uploaded from our branches. These branches databases are then restored into the main system. The Main Office then access to these databases individually.Currently, separate copies of the same zope application is copied in the same Zope server corresponding to each branch database. The main reason is because we are unable to resolve database connection to multiple databases. Is there anyway where we can have a dynamically database connection to each branch database with only one zope application (instead of multiples of the same application).We are using Zope 2.8.6, Postgresql 8.0.4 with Psycopg-1.1.21 connector.Thank you.CY __Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] A web based rewards management system for [EMAIL PROTECTED]

2006-06-07 Thread bob gmx
Hi Everyone,

Can you help a colleague? [EMAIL PROTECTED]

He is looking for the following:-

 Okay here goes with a v brief requirement:

 + A web based rewards management system (a points scheme like
 mypoints, ipoints, rpoints),

 + Versatile content management system + community,

 + CRMS / email marketing system (or use a white-listed third party),

 + Easily skinned,

 + Powerful product, retailer, manufacturer directory, with - rate and
 reviews functionality , price comparison (eventually)

 + Ability to import and update large datasets easily,

 + Ability to serve own content and others content, maybe using
 xml/xsl, easily  fast

 + All with some clever back-end functions, stats, fraud prevention …

 I want to skew rewards for green / ethical / fair-trade products /
 services and use affiliate schemes like trade-doubler  CJ to get
 commissions which are recycled, but u get points whatever you buy (you
 cannot be good all o the time), but more if you buy green. You collect
 points and redeem for vouchers or donate to charity. Some of the
 commission goes to planet saving schemes.

 I discovered joomla recently, and I reckon you could do this through
 it, drupal or similar, plus stuff like oscommerce, phpbb, phplist,
 h2desk, for a very low initial outlay. When stumbled on the CMS Plone
 and remembered you talking enthusiastically about zope and python
 (good enuf for google is good enuf 4 me).

 Anyway the rewards system, which tracks links to completed
 transactions, is well beyond my primitive abilities. Also is my
 directory requirement combined with rewards actually actually just a
 modified shop?

 I don’t have a large budget, so was wondering about procuring in
 eastern Europe or India – am I completely mad?

 Any ideas?

Best Regards/MfG,

Bob Wheldon

Mobile  +49  179 5061083
Private/Privat  [EMAIL PROTECTED]
[EMAIL PROTECTED]




begin:vcard
fn:Bob Wheldon
n:Wheldon;Bob
email;internet:[EMAIL PROTECTED]
tel;work:+49 8444 915382
tel;fax:+49 8444 915384
tel;home:+49 8444 73 09
tel;cell:+49 179 5061083
x-mozilla-html:FALSE
version:2.1
end:vcard

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db