Re: [Zope] Zope and Log File Analysis

2006-10-19 Thread Sascha Ottolski
Am Mittwoch, 18. Oktober 2006 22:03 schrieb Doyon, Jean-Francois:
 The big problem I have is determining file types without having
 file extensions, since many objects are name with a simple id that
 doesn't contain a typical file extension.

 This makes it supremely difficult to determine viewing statistics
 based on content type for example ... Or determining what should be
 concidered a page view, and so on.

one not so elegant solution to log real page views only: create your own 
logger, and call it somewhere in you master template (probably close to 
the end of it so logging doesn't happen if there was an exception 
before that point).


Cheers, Sascha

-- 
Lalisio GmbH                                          www.lalisio.com

Puschkinstraße 1                             fon +49-(0)361/541 43 80
99084 Erfurt                                 fax +49-(0)361/541 43 79
                                                 [EMAIL PROTECTED]

+
AKTUELLER HINWEIS (Oktober 2006)

Wussten Sie schon, dass Lalisio ab sofort den Dokumentenlieferdienst 
CISTI in seine Literatursuchmaschine einbindet? Sobald Sie über 
unsere Literatursuchmaschine in den Datenbanken Ingenta oder Projekt 
MUSE relevante Artikel finden, können Sie die bibliographischen Daten
per Mausklick an CISTI übermitteln und Kopien der Artikel bestellen. 

Testen Sie unser Angebot unter www.lalisio.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] Tab completion in zopectl debug

2006-10-18 Thread Sascha Ottolski
Am Mittwoch, 18. Oktober 2006 01:43 schrieb Maurits van Rees:
 Hi,

 I have recently learned how to add tab completion to an interactive
 python session and to pdb, thanks to Tom Lazar and to Jacob at
 ParTecs.  More info with links on my first blog entry in three
 months:

 http://maurits.vanrees.org/weblog/2006/10/tab-completion.html

just a thought: you might also use ipython, which has tab-completion by 
default: http://ipython.scipy.org/moin/About


Cheers, Sascha

-- 
Lalisio GmbH                                          www.lalisio.com

Puschkinstraße 1                             fon +49-(0)361/541 43 80
99084 Erfurt                                 fax +49-(0)361/541 43 79
                                                 [EMAIL PROTECTED]

+
AKTUELLER HINWEIS (Oktober 2006)

Wussten Sie schon, dass Lalisio ab sofort den Dokumentenlieferdienst 
CISTI in seine Literatursuchmaschine einbindet? Sobald Sie über 
unsere Literatursuchmaschine in den Datenbanken Ingenta oder Projekt 
MUSE relevante Artikel finden, können Sie die bibliographischen Daten
per Mausklick an CISTI übermitteln und Kopien der Artikel bestellen. 

Testen Sie unser Angebot unter www.lalisio.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] How can I store session data to db on login/logoff events ?

2006-10-12 Thread Sascha Ottolski
Am Donnerstag, 12. Oktober 2006 08:50 schrieb Pletli Antal:
 Thanks Dieter, it's work.

 But i have a problem with this:

 When I ran the test python script (see below) in Zope or I called the
 url directly from the browser , I got an error:

 Error Type: KeyError
 Error Value: 'SESSION'

we've seen this problem regulary, and work around it like so:

def getSession(self):
 
try:
session = request.SESSION
except KeyError:
session = self.session_data_manager.getSessionData()

return session


Cheers, Sascha


-- 
Lalisio GmbH                                          www.lalisio.com

Puschkinstraße 1                             fon +49-(0)361/541 43 80
99084 Erfurt                                 fax +49-(0)361/541 43 79
                                                 [EMAIL PROTECTED]

+
AKTUELLER HINWEIS (Oktober 2006)

Wussten Sie schon, dass Lalisio ab sofort den Dokumentenlieferdienst 
CISTI in seine Literatursuchmaschine einbindet? Sobald Sie über 
unsere Literatursuchmaschine in den Datenbanken Ingenta oder Projekt 
MUSE relevante Artikel finden, können Sie die bibliographischen Daten
per Mausklick an CISTI übermitteln und Kopien der Artikel bestellen. 

Testen Sie unser Angebot unter www.lalisio.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] ZOPE/Python Stellenangebote

2006-02-28 Thread Sascha Ottolski
[Please excuse this job offer in german language]

Gallileus GmbH (Erfurt) sucht Entwickler

Wir suchen ab März 2006 einen ZOPE-/Python-Entwickler, sowie einen 
Webentwickler, beide zur Festanstellung in Erfurt.

Zusätzlich suchen wir für die selben Bereiche Praktikanten und 
studentische Hilfskräfte.

Weitere Informationen unter http://www.gallileus.info/about/jobs/


Mit freundlichen Grüssen,

Sascha Ottolski

-- 
Gallileus - the power of knowledge

Gallileus GmbH                    http://www.gallileus.info/

Puschkinstraße 1                    fon +49-(0)361/541 43 80
99084 Erfurt                        fax +49-(0)361/541 43 79
                                       [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] zope-2.9 r40780 make install doesn't finish, files missing from bin

2005-12-18 Thread Sascha Ottolski
Am Mittwoch, 14. Dezember 2005 21:11 schrieb Jeff Kowalczyk:
 I'm having some trouble with the 'make install' stage of Zope-2.9 svn.

Hi Jeff,

just stumbled over the same problem. By chance, we figured out how to do it: 
you need to make sdist beforehand, which creates a tarball for you, which 
in turn you must use to perform the regular install. make sdist needs 
zpkg, which is found at http://svn.zope.org/zpkgtools/; don't know how to 
install it, so we just changed the path in the makefile to point to the right 
place, in our case

ZPKG=/mnt/source/svn/svn.zope.org/zpkgtools/bin/zpkg


Hope that helps,

Sascha

-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany
___
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] manage_minimize

2005-11-04 Thread Sascha Ottolski
Am Freitag, 4. November 2005 11:33 schrieb Krzysztof Kubacki:
 When I do it this way
 context.Control_Panel.Database.mounted_database.manage_minimize() it
 minimizes main database but not mounted_database,

 but when I do it this way
 context.REQUEST.RESPONSE.redirect('Control_Panel/Database/mounted_database/
manage_minimize') it works.

 Why??? I have to use the first solution becouse I'm going to place more
 code after minimizing.

I believe something like 

container.Control_Panel.Database['mounted_storage'].manage_minimize()

should to the trick; and would think that your version should throw an 
AttributeError. strange that it doesn't :-)


Hope it helps,

Sascha

-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany

+++
AKTUELLER HINWEIS (November 2005)

Lesen Sie bei Gallileus über aktuelle Forschungsergebnisse
aus den Hochschulen:

http://www.gallileus.info/gallileusnews/gInstitutionen/
+++
___
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] manage_minimize

2005-11-04 Thread Sascha Ottolski
Am Freitag, 4. November 2005 11:34 schrieb Jens Vagelpohl:
  Zope-2-7-6
  I would like to minimize cache of my ZODB mounted database by
  manage_minimize function from PythonScript placed in Root Folder.

 Why? Do you expect to reduce the Zope memory footprint? That won't
 happen on most operating systems...

you might not get memory back, but you could prevent that too much is consumed 
in the first place. at least thats what I believe to have observed for long 
running maintenance jobs that touch many (several thousands) objects during a 
transaction. of course, if its possible to commit() once in a while saves way 
more memory.

Cheers, Sascha


-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany

+++
AKTUELLER HINWEIS (November 2005)

Lesen Sie bei Gallileus über aktuelle Forschungsergebnisse
aus den Hochschulen:

http://www.gallileus.info/gallileusnews/gInstitutionen/
+++
___
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 2.8 or 3.1?

2005-10-28 Thread Sascha Ottolski
Am Freitag, 28. Oktober 2005 11:33 schrieb HaraldFinnås:
 bruno desthuilliers [EMAIL PROTECTED] wrote on 28.10.2005 11:09:00:
  Have you tried Trac ?

 No, but now I will. It's listed as software development tracking so I've
 ignored it. :)

you also might want to take a look at roundup 
(http://roundup.sourceforge.net/), if you prefer python.


Cheers, Sascha

-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany

___
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 2.8 or 3.1?

2005-10-27 Thread Sascha Ottolski
Am Donnerstag, 27. Oktober 2005 09:37 schrieb Jens Vagelpohl:
 The only issues you might ever run into would be problems with the  
 Python that comes with the OS. But then again if you run Zope in  
 production you should never ever use the system Python and build your  
 own instead. The system Python tends to be compiled with weird flags  
 on RH-based distros to suit their own needs for the many Python-based  
 scripts they have in the OS. Don't use it, build your own.

I'd be very curious to hear about what real life problems people have 
observed. The advice is mention so often here, without any proof (at least 
thats my impression). Does it run slow? Does product xy behave strange? Does 
it crash?

We have some well loaded (2.8.x ZEO setup) servers up and running, using the 
standard python install that comes with fedora 3 (or their official updates), 
and that seems not to have any obvious disadvantages (beside the fact, that 
they still offer 2.3.4 only).


Cheers,

Sascha

-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany
___
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 2.8 or 3.1?

2005-10-27 Thread Sascha Ottolski
Am Donnerstag, 27. Oktober 2005 13:20 schrieb Jens Vagelpohl:
 You just noted one more disadvantage yourself: The system Python is  
 likely to be out of step with what Zope wants. Furthermore, updates  
 to the system Python or to add-on packages might have unintended  
 consequences for your Zope setup.

well, might have is one thing, really experiencing problems is quite 
different...


-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany
___
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 2.8 or 3.1?

2005-10-27 Thread Sascha Ottolski
Am Donnerstag, 27. Oktober 2005 14:17 schrieb Jens Vagelpohl:
  well, might have is one thing, really experiencing problems is quite
  different...

 Look, it's all about how much risk you are willing to carry. I don't
 like playing Russian Roulette with services that are supposed to be
 highly available. And I don't want to have to waste a single thought
 on problems that *might* develop if RedHat or their packagers decide
 to do something to their Python or to Python add-ons I use. I also
 prefer to do upgrades to these components on my own schedule, not
 when someone else who has no idea about my various usage scenarios
 thinks so.

hey, no offence, I absolutely see your point. it's just that I'm really 
curious about what practical problems people have seen, as we seem not to 
have any...and in my point of view, it's less to think about when I simply 
stick to the packages that come with the OS :-)

cheers, Sascha

-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany
___
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] ZEO client authentication

2005-10-03 Thread Sascha Ottolski
Am Montag, 3. Oktober 2005 14:44 schrieb Mika, David P (Research):
 I see that ZEO supports a simple digest authenitcation of clients and that
 this is set in the zeo's config file with the keys:
 authentication-protocol, authentication-database and authentication-realm.

 Further, I can see that a client can connect using e.g. ZEO.ClientStorage
 with arguments for a userid  password (set in the ZEO authentication
 database).  However, how does one configure Zope (as a client to the ZEO
 server) to use this authentication?  I see nothing in the Zope config file.
  Somehow Zope must be able to pass a valid userid and password in the
 authentication database to ZEO.

 Dave

Hi Dave,

this might help, although it's not written by me so I'm not 100% sure that 
I've picked up everything:

small patch to lib/python/ZODB:

--- config.py(revision 37730)
+++ config.py(working copy)
@@ -150,7 +150,10 @@
 max_disconnect_poll=self.config.max_disconnect_poll,
 wait=self.config.wait,
 read_only=self.config.read_only,
-read_only_fallback=self.config.read_only_fallback)
+read_only_fallback=self.config.read_only_fallback,
+username=self.config.username,
+password=self.config.password,
+realm=self.config.realm)

 class BDBStorage(BaseConfig):

Index: component.xml
===
--- component.xml(revision 37730)
+++ component.xml(working copy)
@@ -132,6 +132,16 @@
 read_only_fallback should be true.
   /description
 /key
+key name=username required=no
+  description
+The authentication username of the server.
+  /description
+/key
+key name=password required=no
+  description
+The authentication password of the server.
+  /description
+/key
 key name=realm required=no
   description
 The authentication realm of the server.  Some authentication


something like this in your zeo.conf zeo section:

zeo
  ...
  authentication-protocol digest
  authentication-database $INSTANCE/etc/auth.db
  authentication-realm your_realm
  ...
/zeo

obviously, a username/password in $INSTANCE/etc/auth.db (ZEO instance, that 
is):

$ cat /mnt/zope/ZEOHome/etc/auth.db
realm your_realm
your_username: your_crypted_password

and something like this in your zope.conf:

zodb_db main
  mount-point /
  cache-size 1
  zeoclient
server localhost:1234
username your_username
password your_cleartext_password
...
...
  /zeoclient
/zodb_db main

now, I'm not sure how to create the encrypted password, I guess zpasswd.py 
will help.


Good luck,

Sascha

-- 
Gallileus - the power of knowledge

Gallileus GmbH   http://www.gallileus.info/

Pintschstraße 16  fon +49-(0)30-41 93 43 43
10249 Berlin  fax +49-(0)30-41 93 43 45
Germany
___
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] Parse a XML file in Zope, zopeXMLmethods Product not working in Zope 2.8.1

2005-09-26 Thread Sascha Ottolski
Am Montag, 26. September 2005 15:57 schrieb Martin Koekenberg:
 Hello,

 I've a xml file on the file system (the source is on an other webserver and
 the download is scheduled). How ca I parse this file with a xslt in Zope.
 ZopeXMLmethods isn't working annymore in Zope 2.8.1.

 Does annyone knows a Product of method to parse xml in Zope without the
 zopeXMLmethods product ?

 Regards,

 Martin Koekenberg

I do it like this (ExternalMethod in this case):


import libxml2
import libxslt

stylestring = file(/path/to/style/file.xsl).read()

def xslt(data):
# note: if styledoc and style are defined outside the function,
# zope dumps core :-(
styledoc = libxml2.parseDoc(stylestring)
style = libxslt.parseStylesheetDoc(styledoc)
doc = libxml2.parseDoc(data)
result = style.applyStylesheet(doc, None)
html = style.saveResultToString(result)
style.freeStylesheet()
doc.freeDoc()
result.freeDoc()
return html



may be not very smart, but it's working :-)


Cheers, 

Sascha
___
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] create a new log file

2005-09-24 Thread Sascha Ottolski
Am Montag, 19. September 2005 20:19 schrieb Nuno:
 Hi!

 How can I create a new log file, e.g. mylog.log, this is to log
 specific jobs in a different log file of event.log.

depending on your needs, the EventLogManager Product might suit you:

http://www.zope.org/Members/mcdonc/Products/EventLogManager


Cheers, Sascha
___
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] securing webdav

2005-09-24 Thread Sascha Ottolski
Am Samstag, 24. September 2005 01:08 schrieb David Bear:
 I run zope in back of apache, and let apache handle tls/ssl.

 In all the searching on zope.org http://zope.org though I haven't found
 any documents on how to let apache handle securing webdav for zope as well.

 Anyone see/written such?

depending on your situation, a ssh tunnel might be feasible; works perfectly. 
small drawback is, you obviously have to open a ssh session first (ssh-agent 
is your friend).


Cheers, Sascha
___
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] securing webdav

2005-09-24 Thread Sascha Ottolski
Am Samstag, 24. September 2005 01:08 schrieb David Bear:
 I run zope in back of apache, and let apache handle tls/ssl.

 In all the searching on zope.org http://zope.org though I haven't found
 any documents on how to let apache handle securing webdav for zope as well.

 Anyone see/written such?

forget that one: another approach might be put a pound reverse proxy in front 
of your zope, that handles your ssl connection.

Cheers, Sascha
___
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] Output only the first or a particular record using TAL

2005-09-14 Thread Sascha Ottolski
Am Mittwoch, 14. September 2005 06:48 schrieb Julian Yap:
 I was along the lines of something like this:
 tr tal:define=x container/getCustomerLicences
     td tal:replace=x/full_name[0]/td
 /tr

you can't mix path expressions and python expressions. try something like

td tal:replace=python: x.full_name[0]/td


Cheers, Sascha
___
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 scalabilty and problems

2005-09-01 Thread Sascha Ottolski
Am Mittwoch, 31. August 2005 18:50 schrieb J Cameron Cooper:
 There are lots of ways to improve performance just administratively. You
 can improve various zope.conf settings, and set up caching (either RAM
 or HTTP Accel.) in Plone. You can also put a caching proxy server (like
 Squid) in front of your Zopes.

not to forget that playing with the zeo and/or zope database caches might 
help; if you see lots of conflict errors in you logs, may be an upgrade to 
2.8 with MVCC does a benefit. and, of course, look carefully if any other 
tasks on all of your servers compete with your cpu and io resources.

Cheers, Sascha

P.S. just in case, debug mode or profiling and such are better to be disabled 
on your live system...:-)
___
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: ZSyncer and Zope-2.8.0

2005-08-15 Thread Sascha Ottolski
Am Montag, 15. August 2005 00:54 schrieb Paul Winkler:
 The trunk should now be in usable condition, I hope. I´m sorry it was
 broken for so long.
 I am on vacation now, and unlikely to respond in this thread again
 until I return on 8/21.
 Within a week thereafter, I hope to tag and release zsyncer 0.7-beta1.

Hi Paul,

thanks for the info. Just to let you know, I just cvs upped to the trunk, but 
unfortunately syncing didn't work for me.

To make a long story short, i append a small diff against the trunk that seems 
to work for me (not thoroughly tested, though, and not perfect about 
authorization).

Heres what happened: I've always seen this error:

Module Products.ZSyncer.ZSyncer, line 1503, in call_
Module copy_reg, line 69, in _reduce_ex
TypeError: can't pickle function objects

Which I can get around by changing line 1501 of ZSyncer.py from

result = sys.exc_info()[:2]
to
result = (str(sys.exc_info()[0]), str(sys.exc_info()[1]))


Which in turn tells me, that security bites me. This happens no matter if I 
use the current account or the http://username:[EMAIL PROTECTED]/. I double 
checked permissions, Manager Role is Allowed to User ZSyncer and View 
Management Screens.

Good news is, Dieter gave a hint about to exchange validateValue with 
validate, which seems to help (at least for the username:password thingy; 
it still wont sync with the current user for me).

Incidentally, I stumbled about a problem when an object is on the remote 
syncer, but not the local, which seems to be fixed by an addition to an 
except clause; and finally I found that if you want to browse ZClasses for 
syncing, a reordering of an if/elif is necessary.

Hope someone finds it useful.


Cheers, Sascha
diff -u -r1.69 ZSyncer.py
--- ZSyncer.py  11 Aug 2005 20:31:29 -  1.69
+++ ZSyncer.py  15 Aug 2005 20:03:19 -
@@ -649,10 +649,10 @@
 else:
 obj_info = {}
 # Get the sub-objects.
-if getattr(aq_base(path_object), 'isPrincipiaFolderish', 0):
-sub_objects = path_object.objectValues()
-elif _isZClassFolder(path_object):
+if _isZClassFolder(path_object):
 sub_objects = path_object.propertysheets.methods.objectValues()
+elif getattr(aq_base(path_object), 'isPrincipiaFolderish', 0):
+sub_objects = path_object.objectValues()
 else:
 sub_objects = []
 for ob in sub_objects:
@@ -759,7 +759,7 @@
 # not guaranteed to be correct when virtual hosting.
 # Someday this should go away.
 full = '/'+obj.absolute_url(relative=1)
-except (KeyError, NotFound):
+except (ZSyncerObjNotFound, KeyError, NotFound):
 # No object found, maybe Extra. Fall back to the original.
 full = relative = path
 request = self.REQUEST
@@ -1322,7 +1322,7 @@
 obj = self.traverseFromRoot(path)
 method = getattr(obj, method_name)
 sm = getSecurityManager()
-if not sm.validateValue(method):
+if not sm.validate(self, self, method_name, method):
 user = sm.getUser().getId()
 err =User %s is not allowed to call %s here % (user,
  method_name)
@@ -1486,7 +1486,7 @@
 method_name, args, kw= loads(request)
 try:
 method = getattr(self, method_name)
-if not getSecurityManager().validateValue(method):
+if not getSecurityManager().validate(self, self, method_name, method):
 raise Unauthorized
 result = method(*args, **kw)
 ok = 1
@@ -1498,7 +1498,7 @@
 # informative about it.
 self._logException('Exception in call_')
 # We want to send back the exception.
-result = sys.exc_info()[:2]
+result = (str(sys.exc_info()[0]), str(sys.exc_info()[1]))
 ok = 0
 return dumps((ok, result), 1)
___
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: ZSyncer and Zope-2.8.0

2005-08-15 Thread Sascha Ottolski
Am Montag, 15. August 2005 22:20 schrieb Sascha Ottolski:
 To make a long story short, i append a small diff against the trunk that
 seems to work for me (not thoroughly tested, though, and not perfect about
 authorization).

sorry for replying to myself, just noticed that while browsing of ZClasses via 
ZSyncer works with my patch, diffing and syncing of methods still doesn't. 
the problem seems to lie in 

traverseFromRoot(self, relative_path)

but I wasn't able to fix it. I think something about how to acces an attribute 
belonging to someZClass.propertysheets.methods.


Cheers, Sascha
___
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: ZSyncer and Zope-2.8.0

2005-08-13 Thread Sascha Ottolski
Am Samstag, 13. August 2005 02:11 schrieb Simon Michael:
 If I try Sascha's username:password@ workaround, I get::

it may well be that the username:password thingy was introduced in the CVS at 
some point, but not in any release so far. sad thing is, last time I checked 
the HEAD wasn't usable. I'm running a checkout with (date-)tag 
D2005.06.03.08.13.48.

having said that, it look as if there were checkins just two day ago, may be 
the HEAD is in order again...?


Hope that helps,

Sascha
___
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] Changing Properties With ZPT

2005-08-10 Thread Sascha Ottolski
Am Mittwoch, 10. August 2005 16:31 schrieb Dyyryath:
 An example is probably in order. Take the following code:

 div tal:content=template/titleTITLE HERE/div
 div tal:content=python:context.titleTITLE HERE/div

why not using the same name in the python expression? :-)

div tal:content=python: template.titleTITLE HERE/div

just beware that the path expression template/title might do some magic for 
you, like calling a method, or accessing a dictionary etc. if in doubt, you 
can always do

div tal:content=python: path('template/title')TITLE HERE/div


cheers, sascha
___
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] large installations and conflict errors

2005-08-09 Thread Sascha Ottolski
Am Dienstag, 9. August 2005 02:03 schrieb Andrew Langmead:
 (on these  
 machines, the ZEO client cache is set to 2GB and a cache flip occurs  
 maybe twice a week.)

I think this part to be quite interesting. We too are experimenting with the 
optimal cache sizes, where our (daily) packed Data.fs is only about 7 GB. 
Its only since friday that we updated to the latest 2.8-svn codebase, to get 
the latest fixes of the ZODB/ZEO cache tracing parts.

Our setup is one ZEO server, and two clients on seperate machines. A third 
client is on the same machine as the server, which is only used for 
admin/maintenance tasks.

What we've seen so far: we used to set the cache-size to 250 MB; and every 
know and than we have to observe that after a restart of a client a cache 
verification is necessary (while not always obvious, why this happened), 
which often takes forever (that is, 10 to 20 minutes are possible). And 
that during such a verification, the whole system seems to be down (in the 
sense that delivery of pages is slow as hell :-(). I think that in such a 
case simply deleting the cache file and starting with a fresh one is way 
faster, but have no hard numbers to prove that feeling.

Now we look what happens at different cache sizes. While it might be too early 
to really make conclusions, at least it might give some hints: We have set 
the cache on one machine to be 200 MB, and on the other to 100 MB. Up to now, 
even the 100 MB cache gives a hitrate of better than 98 % (!) most of the 
time.

What I hope is, that the smaller the cache size, the faster the verification, 
if necessary. Again, no real hard numbers to check this (seems to be hard to 
get some, sometimes the log says things like

2005-08-08T00:10:55 INFO ZEO.ClientStorage (27891) No verification necessary 
(last_inval_tid up-to-date)
--
2005-08-08T00:10:55 INFO ZEO.ClientStorage (27891) Waiting for cache 
verification to finish
--
2005-08-08T00:10:55 INFO ZEO.ClientStorage (27891) Verifying cache
--
2005-08-08T00:10:55 INFO ZEO.ClientStorage (27891) endVerify finishing
--
2005-08-08T00:10:55 INFO ZEO.ClientStorage (27891) endVerify finished

huh? no verifictation necesarry, but waiting for verification to finish? 
sometimes, the endVerify messages never appear; and you never know which of 
our three storages the messages are about...). We increased the servers 
invalidation-queue-size from 100 to 1000 along the way, don't know yet if 
this has any effect.

Having said all this, our scenario might not be common, as a major part of the 
traffic concentrates on a small part of the site, which might be the reason 
that even a small cache seems to be sufficient here.

I'm wondering if anybody else has seen long lasting cache verifications, which 
seems to block the whole system. Or if someone knows how to prevent this from 
happening at all...


Cheers,

Sascha
___
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] ZSyncer and Zope-2.8.0

2005-08-05 Thread Sascha Ottolski
Am Freitag, 5. August 2005 09:16 schrieb Thierry FLORAC:
   Hi,

 I'm trying to use ZSyncer 0.6.1 to synchronise simple objects (page
 templates...) between a Zope-2.7.6 source database and a Zope-2.8.0
 destination database (both on Solaris with Python 2.3.4).
 I'm using a user which have a Manager role on both sides, but I can't
 manage ZSyncer to work : an Unauthorized exception is always raised !
 I can't even manage to see a listing of the different folders.

 Any help would be great !!

hi thierry,

i've seen the same. i get around it by including username:password into the 
url of the remote syncer, something like

http://username:[EMAIL PROTECTED]/ZSyncer



hope this helps,

sascha
___
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] zope-2.8, i18n and global locales catalog

2005-04-24 Thread Sascha Ottolski
Hi,

does anybody know if and how I could build a global locales catalog in 
zope-2.8? I'm already through the i18n chapter in the zope-3 book, and think 
to know how to set one up on a per product level. I made a locales dir in my 
INSTANCE_HOME, but that doesn't seem to do the trick. However, I'm not sure 
if I might need some zcml-magic to use the i18n stuff globally and/or in a 
zope-2 product, and how I would have to do it.

Having asked that, I hope I'm correct to assume that it is possible to use 
zope-3's i18n services in a zope-2.8 via Five...

BTW, has the i18n service in zope3 something like I've seen in 
PlacelessTranslationServices, that would assist in collecting untranslated 
strings on the fly (PTS can append those strings to .missing files and/or 
present those strings via ZMI)?


Thanks,

Sascha
___
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] repozo over nfs?

2005-04-21 Thread Sascha Ottolski
Hi,

I'm wondering how and how often people run repozo. Myself am running it to 
perform one full backup every night (after a pack), and a incremental one 
every hour (which needs about 15 min. with nice -n19).

What bothers me, however, is the fact, that the backup process is real hit on 
the overall performance (espacially . The server in question has a RAID-5 
setup, storing the backups on the same array as it reads the Data.fs from. 
Obviously, this keeps the harddisk quite busy during the backup.

Now, did anyone try to let repozo write the backups onto a nfs share on 
another machine? Would that reduce the hit?

Besides that, how often do you guys run your backups? In fact, I never needed 
to recover one until now, but if the case ever happens, I would prefer to 
have as recent data as possible, of course.


Thanks, Sascha
___
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 )