Re: [Zope] Zope2 - pro/contra

2015-03-16 Thread robert rottermann
I just had to port an Intranet to modern hardware/Linux that has been created 
in  1996 using plain zope and has been programmatically untouched since 2001.

The Intranet is rather complex and provides a kind of ERP on very technical 
data.
The application consist of some 1000 little dtml scripts and is totaly 
unmaintainable.

But it runs and runs and runs and is heavily used..

Unhindered by the fact that the inner working of the Intranet is unfathomable 
the transition to an up to date virtualized linux, actual postgres and such  
went rather easily.


Zope might be a zombie, but it is a great and sturdy one ..

hats of to its creators..

robert


On 17.03.2015 02:37, Jesus Cea wrote:

On 07/03/15 16:30, Simon Michael wrote:

I've sent you a download link.

I’m somewhat familiar with it, as I managed at least the zope2 wiki (and
wrote Zwiki)

ZWIKI... God...

Is there any possibility of upgrading it to support current Zope2?. I
have currently two zope instances: a current zope and an aging Zope 2.10
just to host ZWIKI :(.

About current topic: I am not a web developer. I host my (heavy)
personal ZOPE webserver and a handful of WSGI handcoded services. But my
Zope webserver is working well and I am happy with it. Every now and
then I have to write new logic and I must decide to invest into Zope o
just bite the bullet and jump to Django, Piramid, whatever.

I am keeping Zope because I am using it since 1998 and I know it
inside-out. I can do whatever I want with it and the HUGE learning curve
is already amortized. I just consider other choices because I feel that
Zope 2 is a dead-end, not because I am unhappy with it. But Zope wins
every time so far :)

That said, documentation is really painful. It is very fragmented and it
is not easy to separate outdated from current. Messy. Since current
codebase seems to change really slowly (mature!) I would love to see a
documentation effort. Not holding my breath :-(. Most of the time, when
implementing something new, I don't have any other choice than dive into
the Zope sourcecode. Doable but time-wasting.



___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] SQL and Python Products

2013-01-16 Thread robert rottermann

Hi Luiz,
use  sqlalchemy together with z3c.saconfig.
Powerfull, flexible, easy to use ..

And in martin aspelis book is a chapter how to use them ..

robert

On 01/16/2013 07:34 PM, Luiz Pasqual wrote:

Hi,

We are trying to migrate a very old application on Zope 2.9, first we 
thought to migrate to Python Products and then upgrade Zope.


We don't know what's the best way to deal with SQL querys in Python 
products. He is some options we are evaluating:


- SQLAlchemy, leaving behind ZSQLMethods e Zope DA's
- Psycopg
- Python code access a Zope DA inside Zope

So, what you guys think?

Thanks.

--
Luiz Fernando Pasqual S. Souza
mail: l...@pasquall.com mailto:l...@pasquall.com


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] path of a fileupload instance

2012-11-14 Thread robert rottermann

to my knowledge, for security reason no modern browser submits the path anymore.
If you need the path, you have to create your own file uploader or use a tool 
like uploadify (http://www.uploadify.com)

I *think* javascript gets you access to the full path.

robert
On 11/14/2012 08:35 AM, Kees de Brabander wrote:

I was using IE and filename is just the file name, no directory information. So 
I will have to take another approach. Does a FileUpload instance have any other 
attributes than filename and header?

On Nov 13, 2012, at 6:11 PM, Andreas Jung wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

This is subject to browser. All browser - except IE (afaik) - only
submit the filename without directory information.

- -aj

Kees de Brabander wrote:

Correct, but the filename attribute contains just the filename, not
the path of the directory where it was uploaded from? cb On Nov 13,
2012, at 11:04 AM, Andreas Jung wrote:

REQUEST.yourfile.filename. The FileUpload instance has a 'filename'
attributes.

-aj

Kees de Brabander wrote:

Hiya

I have a form with a field for a FileUpload object, which works
ok. However, in my application I want to capture the path of
that file, because I want to open still other files that I know
by name from that very same directory. Any idea how to do that?
The REQUEST simple contains the FileUpload instance.

___ Zope maillist
- Zope@zope.org https://mail.zope.org/mailman/listinfo/zope **
No cross posts or HTML encoding!  ** (Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )

lists.vcf
- -- 
ZOPYX Limited | Python | Zope | Plone | MongoDB

Hundskapfklinge 33| Consulting  Development
D-72074 Tübingen  | Electronic Publishing Solutions
www.zopyx.com | Scalable Web Solutions
- --
Produce  Publish - www.produce-and-publish.com


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJQon9AAAoJEADcfz7u4AZjSwsLv0Q6WXixh/gYddZObYa1O3F4
EmhCoFjfAwgFtT8WkWpTkP4l0myjOUqPdOhJvvBxPIAtqTDPu6V6YEXM5nK1loE4
Shjz3feKRsxP784arefzD1CpRiN/YQhMSn+ZYMyy/IpHV1Ypy7vsF1HJSaCY8sqm
yaItArafhVrCrrSwGxOCaUNG83w6m0X0MlEg/phCmW3Lkz4lvwcgehEuiqHGYnrE
TwpAiBnS4ucjdgR+Zkf9sSmxKkjUiBuYenHgsHZiXwDxYaXQra1NHeCrQha1DASx
EliQuhN9Qz/A+4ZiAHj9yMwrVDEeK4oCwAxBuSsIxhO48Bj9mjXm33iSkyi0L7o7
1I0DQqCKl/1Rh6gFUmBtztzAvcz/vtB5tfjZ71u9zdQARd9zX2YKkdRQnA/l+tIG
WgwbsR/Ium2xyDp9Piqfw0rGlZzLZrp3ekbAHVwdAHR7hqGUh6nXotbJVgCOjTDz
PorJJ9CA/DZ+SWHQcQXyC8wtImS6zAI=
=aN3X
-END PGP SIGNATURE-
lists.vcf

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] CMF -?- Zope

2011-06-23 Thread robert rottermann
as root (or using virtualenv)
easy_install-2.6 -U ZopeSkel
then as user zope (or what ever)
paster create -t plone4_buildout NAMEOFNEWBUILDOUT
cd NAMEOFNEWBUILDOUT
python2.6 bootstrap
bin/buildout

and your new site is ready to start with
bin/instance fg

point your browser at localhost:8080/manage

install a new plone site ..

robert

On 23.06.2011 06:48, Eric d'Halibut wrote:
 I am a straggler returning to Zope after years away from it. I come
 from a time when to install a product into one's Zope one simply
 untarred it into one's Products folder and restarted. Now I am looking
 at easy_install, buildout, and the new mania for eggs. Imagine my
 discomfiture.

 But never mind all that. I now have a running instance of Zope 2.12.10
 installed in NetBSD 5.1. I want to install CMF into it, which used to
 be one's first product chore (almost) since plone depended on it and I
 was heading for a plone install, (and later on ran Silva for a couple
 of years.) But I am here tonight to say, I am stumped.

 How do get CMFCore into my zope instance the right way? Can someone
 lay out the steps for me?

 My python is: /usr/pkg/bin/python2.6

 My Zope is at: /usr/local/src/Zope2-2.12.10

 My instance is at: /usr/local/Zopeish

 I have banged around with easy_install, which writes things into my
 NetBSD /usr/pkg hierarchy, of which I very much disapprove. Buildout
 seems always to want to build the original gazillion (not
 complaining!) Zope packages every time I ry to use it.

 So...glad to be back. Need help. Will write if I get work. Wish you were here.

 nb. The running Zope instance is live on the net, so if one needs to
 examine my ZMI I can provide URL and login. Just ask, please.



___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] CMF -?- Zope

2011-06-23 Thread robert rottermann
On 23.06.2011 16:14, Eric d'Halibut wrote:
 On 6/23/11, robert rottermannrob...@redcor.ch  wrote:

 as root (or using virtualenv)
 easy_install-2.6 -U ZopeSkel
 then as user zope (or what ever)
 paster create -t plone4_buildout NAMEOFNEWBUILDOUT
 This last command gives me a sternly-worded, and appearing, warning:

 **   *** NOTE: You probably don't want to use this template!
the alternative would be to use an Installer.
which I never do and (maybe therefore) see not advantage in using over plain 
buildout.

robert

 **  Since Plone 3.1, the preferred way to get a buildout-based setup
 **  for Plone is to use the standard installer for your operating
 **  system (the Windows installer, the Mac installer, or the Unified
 **  Installer for Linux/Unix/BSD).

 How big a deal is this, especially in view of me running said command
 under the /home/ hierarchy where it's not going to -- I hope -- do
 much systemic damage?

 And what if someone wants simply to install Zope and the CMF, and not
 yet make the leap to Plone?

 It seems the message I am getting is 'all roads lead to Plone!'

 Thanks,



___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Migrating a legacy Zope2 app to use buildout.

2011-06-18 Thread robert rottermann
On 17.06.2011 23:57, Jason J. W. Williams wrote:
 Hello,

 Currently, we have a Portal that was built starting in 2004 before
 buildout was available, so our development method has been to export
 and import from the Zope2 WebUI for deployment. That's been a real
 pain and since we've automated the rest of our infrastructure with
 Chef we'd like to be able to do that with Zope. So my question is does
 anyone have pointers for migrating an app that mostly lives in the
 ZODB to a build-out style architecture that we could control with
 Chef? I see tutorials on starting a new Zope 2 app from scratch with
 buildout but nothing on migrating an older one to build out. For
 example, how would we create objects like MySQLUserFolders etc from
 buildout? Thank you in advance.

 -J
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
   https://mail.zope.org/mailman/listinfo/zope-announce
   https://mail.zope.org/mailman/listinfo/zope-dev )
First, would it not be worthwhile to migrate to a newer Plone?
We also still run some very old Plone sites. However, as soon as we have to 
touch one of them in a non trivial way, we migrate.
It is a might require some efforts, especially if you have customized your site 
heavily.

If you can not migrate:
Why do you want to have buildout creating MySQLUserFolders?

Buildout is about setting up your Zope/Plone environment, not about creating 
data.
You set up a buildout 2.5 with all the tools you need. Then, when it runs to 
your satisfaction you copy over the Data.fs of your NOBuildout structure.

robert


___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope-dev] plone 4.1: can not access plone 3.5 site after startup

2011-03-02 Thread robert rottermann
Hi there,
I created a 4.1a3 buildout and added all needed products, of which I had to 
adapt some to be able to start at all.
Then I copied the data.fs of a 3.5x site.

Now in the ZMI, when I want to navigate to the plone 3.5 folder I get the 
following error:

What can I do to fix that?
Do I have to prepare the Data.fs somehow?

thanks
robert

2011-03-02 11:57:55 ERROR Zope.SiteErrorLog 1299063475.730.425785426825 
http://localhost:8481/focus/focus
Traceback (innermost last):
   Module ZPublisher.Publish, line 115, in publish
   Module ZPublisher.BaseRequest, line 437, in traverse
   Module ZPublisher.BeforeTraverse, line 97, in __call__
   Module Products.CMFCore.PortalObject, line 78, in 
__before_publishing_traverse__
   Module zope.event, line 23, in notify
   Module zope.component.event, line 24, in dispatch
   Module zope.component._api, line 136, in subscribers
   Module zope.component.registry, line 321, in subscribers
   Module zope.interface.adapter, line 585, in subscribers
   Module zope.component.event, line 32, in objectEventNotify
   Module zope.component._api, line 136, in subscribers
   Module zope.component.registry, line 321, in subscribers
   Module zope.interface.adapter, line 585, in subscribers
   Module plone.browserlayer.layer, line 14, in mark_layer
   Module zope.component._api, line 179, in getAllUtilitiesRegisteredFor
   Module zope.component.registry, line 176, in getAllUtilitiesRegisteredFor
   Module ZODB.Connection, line 859, in setstate
   Module ZODB.Connection, line 913, in _setstate
   Module ZODB.serialize, line 613, in setGhostState
   Module zope.component.persistentregistry, line 40, in __setstate__
   Module zope.interface.adapter, line 91, in _createLookup
   Module zope.interface.adapter, line 439, in __init__
   Module zope.interface.adapter, line 476, in init_extendors
   Module zope.interface.adapter, line 480, in add_extendor
AttributeError: type object 'IDatabaseSettings' has no attribute '__iro__'
2011-03-02 11:57:55 WARNING OFS.Uninstalled Could not import class 
'IThemeSpecific' from module 'focus.theme.browser.interfaces'
2011-03-02 11:57:55 WARNING OFS.Uninstalled Could not import class 
'IFocViewletManager' from module 'focus.theme.browser.interfaces'
2011-03-02 11:57:55 ERROR ZODB.Connection Couldn't load state for 0x19746b
Traceback (most recent call last):
   File 
/home/zope/focus4/eggs/ZODB3-3.10.1-py2.6-linux-i686.egg/ZODB/Connection.py, 
line 859, in setstate
 self._setstate(obj)
   File 
/home/zope/focus4/eggs/ZODB3-3.10.1-py2.6-linux-i686.egg/ZODB/Connection.py, 
line 913, in _setstate
 self._reader.setGhostState(obj, p)
   File 
/home/zope/focus4/eggs/ZODB3-3.10.1-py2.6-linux-i686.egg/ZODB/serialize.py, 
line 613, in setGhostState
 obj.__setstate__(state)
   File 
/home/zope/focus4/eggs/zope.component-3.10.0-py2.6.egg/zope/component/persistentregistry.py,
 
line 40, in __setstate__
 self._createLookup()
   File 
/home/zope/focus4/eggs/zope.interface-3.6.1-py2.6-linux-i686.egg/zope/interface/adapter.py,
 
line 91, in _createLookup
 self._v_lookup = self.LookupClass(self)
   File 
/home/zope/focus4/eggs/zope.interface-3.6.1-py2.6-linux-i686.egg/zope/interface/adapter.py,
 
line 439, in __init__
 self.init_extendors()
   File 
/home/zope/focus4/eggs/zope.interface-3.6.1-py2.6-linux-i686.egg/zope/interface/adapter.py,
 
line 476, in init_extendors
 self.add_extendor(p)
   File 
/home/zope/focus4/eggs/zope.interface-3.6.1-py2.6-linux-i686.egg/zope/interface/adapter.py,
 
line 480, in add_extendor
 for i in provided.__iro__:
AttributeError: type object 'IDatabaseSettings' has no attribute '__iro__'

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope] WebDAV lock in Zope 2.11.4

2010-12-02 Thread robert rottermann
Am 02.12.2010 18:53, schrieb Brian Sullivan:
 Somehow in testing use of ExternalEditor product I have set the WebDAV
 lock on a file. The problem is that the lock doesn't seem to appear in
 the list of locks from the Control Panel, nor does it clear on a
 restart. I am at loss -- how do I proceed?

 Is there anyway around this?
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
   https://mail.zope.org/mailman/listinfo/zope-announce
   https://mail.zope.org/mailman/listinfo/zope-dev )
be aware that you must enter a path when scanning for locks.
it is not enough just to click on the search buton.

i tripped over this once..

robert
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Date utility for Zope (V2)

2010-11-09 Thread robert rottermann
Am 10.11.2010 02:00, schrieb Brian Sullivan:
 I guess I having a mental block then. To use it from what I know I
 would have create a Zope 2 product from it somehow or create callable
 scripts in the ZMI from the provided code. Neither seems reasonable.

 Is there other way to use the code that I am not understanding?
it is enough to create an external python script.
this is a normal python script that has to reside in
YOUR ZOPEINSTANCE/parts/instance/Extentions

you can do what ever you like in such a script.
there are no restrictions (that I know of).

robert

 On Tue, Nov 9, 2010 at 6:11 PM, Lennart Regebrorege...@gmail.com  wrote:
 On Tue, Nov 9, 2010 at 22:12, Brian Sullivanbriansulli...@gmail.com  wrote:
 On another forum this http://labix.org/python-dateutil was suggested
 -- it looks to be close to what I was thinking --
 I second that.

 but I am not totally
 sure how I can use it in Zope (a level of incompetence issue no
 doubt).
 You would use it as you would use it outside Zope. No difference, it's
 just all Python.

 //Lennart

 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
   https://mail.zope.org/mailman/listinfo/zope-announce
   https://mail.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] commit problems psycopg

2010-08-23 Thread robert rottermann
fyou probably need to commit the data
??
robert
Am 23.08.2010 18:24, schrieb Richard Harley:
We have had a problem with postgresql 8.3 on a Windows server 2008. I
wonder whether there has been any other experiences like this. We have
connected to Potsgres from Zope via a Psycopg adapter and noticed that
sometimes when data is inserted via a form in Zope, the data is
available in Zope but doesn't get committed to the database. This has
come to a head over the weekend where at least one month's worth of data
has disappeared and this includes changes to the actual database
structure - luckily only on a testing machine, but concerning nevertheless.
The data seemed to disappear after we upgraded to the most recent
version of Zpsycopg2 database adapter, previously we were using version
1 (I know it's old, we are only testing after all) and have never had
these sorts of problem before. It's almost as if all the data and
changes to the db were held in memory, and Postgres continued to work
fine from there, but when the db adapter was changed and Zope restarted
everything was cleared from memory.
Has anyone had similar experiences or can anyone cast any light on where
the problem may lie. To us it seems the db adapter is the most likely
candidate but we can't understand how this could happen, explanations
also welcome. Have posted this to psycopg list too.
 Thanks


 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
   https://mail.zope.org/mailman/listinfo/zope-announce
   https://mail.zope.org/mailman/listinfo/zope-dev )




___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Storing DTML in SQL

2010-08-19 Thread robert rottermann
Am 18.08.2010 18:56, schrieb Andrew Milton:
 +---[ robert rottermann ]--
 | I think storing dtml in a db is wrong by design.
 | I do lots of dynamic websites that are generated from external data.
 | i had no need for a single line of dtml yet ...

 I've seen it used a lot in PHP systems like PHP-Nuke, where the widget
 code is executed out of strings in the db. Whether it's necessary or
 not in this instance is debatable.


there is an important difference between php based systems and zope.
a php site is made up from a bunch of code snippets embedded in html 
that are fed into a php interpreter.
where these snippets come from is unknown to the php interpreter. one of 
the reasons (I assume) that such systems tend to be riddled with 
security problems

zope is an application server that sits between the internet and the 
(physical) server on which it runs.
it so divides its univers in an unsave and a save part. everything that 
comes from the internet, that includes operations performed TTW (trough 
the web), is unsave and must be authenticated against zopes strict 
permission system.
everything that comes from the server side (eg. from files loaded from 
the server) is considered save and is not security screened (or at least 
not as tightly).

zopes application server offers you two ways to create dtml objects. TTW 
and from a file. one tightly screens one less so.
now what you propose is a third way. get the dtml objects from a database.
this could for sure be done
but..
you have to write a kind of interpreter that creates an dtml object, 
sets up its context, executes it and manipulates its own environment in 
a meaningful way.
next to that this interpreter has to set up its own security context to 
avoid to punch holes into zopes defenses.

you can imagine, this is no easy chore.

and it would probably be foolish if one tried to implement it.
dtml is just not the way to go. it is a dead end (its developer decided 
so). it is replaced by tal and zope 3 (now bluebream) components that 
are far more powerfull and flexible.
and, alas, not THAT easy to grasp

robert





___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Storing DTML in SQL

2010-08-19 Thread robert rottermann

 By far the majority of new deployments use zope 2 though...


of course.
zope 2 does use 5 which is a zope2/3 bridge.
plone is VERY zope3/five based ..

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Storing DTML in SQL

2010-08-18 Thread robert rottermann
I think storing dtml in a db is wrong by design.
I do lots of dynamic websites that are generated from external data.
i had no need for a single line of dtml yet ...

robert

Am 18.08.2010 18:38, schrieb Andrew Milton:
 +---[ Garry Saddington ]--
 | Andrew Milton wrote:
 |  +---[ Garry Saddington ]--
 |  | Garry Saddington wrote:
 |  |  Justin Dunsworth wrote:
 |  |  I am currently working on a project where I am storing HTML within a
 |  |  MySQL database to display dynamic pages and content in sequences. I
 |  |  would like to be able to store DTML within the tables as well and be
 |  |  able to call them within the page to display that content. I tried
 |  |  mixing the DTML in with the HTML and it shows the HTML correctly but 
 no
 |  |  DTML.
 |  |
 |  |  Is it possible to even do this? Are there other suggestions on how 
 to go
 |  |  about this?
 |  |
 |  |  The closest I have found is on Zopelabs
 |  |  (http://www.zopelabs.com/cookbook/1078612026)
 |  |
 |  | Sorry wrong recipe try this:
 |  |
 |  | http://www.zopelabs.com/cookbook/993850737/1011691351
 |
 |  Do I really have to explain why that particular recipe is a bad idea? d8)
 |
 | Just trying to be helpful. I did say that it was the only thing I can
 | find and I did not recommend it.
 | If you would care to share the problems of the recipe on the list then I
 | am sure all those reading who are new to Zope would benefit;)

 Since python scripts are web callable and something has to be passed
 in... The phrase execute arbitrary code is nearly always quickly
 followed by the phrase remote exploit and lots of sad faces (and
 then some finger pointing d8)



___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] string formatting

2010-08-15 Thread robert rottermann
Am 14.08.2010 22:23, schrieb Jaroslav Lukesh:
 DTML is your friend, not evil.

 JL.


when I was a kid I used to spend my holidays with my grandfather. he was 
an old farmer and used to work with horse and carriage.
it was great and I loved the horses..



___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] long running methods

2010-05-20 Thread robert rottermann
Am 20.05.2010 19:34, schrieb Maik Derstappen, Derstappen IT:
 Am 20.05.2010 16:05, schrieb Jürgen Herrmann:
 On Thu, 20 May 2010 15:59:58 +0200, Patrick Gerken
 do3cc...@googlemail.com  wrote:

 On Thu, May 20, 2010 at 14:18, Jürgen Herrmann
 juergen.herrm...@xlhost.dewrote:


 hi there!

 as our zope2 zodb grows we experience more and more conflicts
 with long running transactions. so i'm going to rewrite these
 methods to commit transactions in batches - here my attempt
 to tackle this problem. the idea is to get a list of objects
 to be modified in this transaction, break it down to batches
 and commit after each batch was processed. to avoid zope's
 retry-on-conflict machinery and still have a chance to retry
 per batch transaction commits, the iteration over one batch
 is guarded by a try:except ConflictError: and a retry logic.


 Zope already has its own retry mechanism, maybe you might want to
 call your long running method multiple times, each time working on the
 next batch.


 in fact zope's retry machinery is kicking in too often which is a
 bad thing if the retried transaction runs for say 30min or so.

 having to gather the list of objects outside of zope, doing the
 batching there and calling into zope multiple times - i wanted
 to avoid that.

 i'd like to have all the logic contained in one zope method
 for the sake of simplicity on the caller's side (most of these
 are kicked off by cron jobs).

 jürgen

 take a look at http://pypi.python.org/pypi/affinitic.zamqp maybe it is a 
 solution for you.
 You can deligate your jobs out of zope and get it back after some time.
 zamqp then fire an event and you subscribe this event to handle thie 
 results.
 
 with kind regards
 Maik Derstappen
 
maik,
this looks interesting.
just out of curiosity: how would one alert the user that a long running job (say
after some 10 minutes) has finished.
does the client have to poll?
or is there some magic push functionality?

robert
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] long running methods

2010-05-20 Thread robert rottermann
Am 20.05.2010 21:01, schrieb Maik Derstappen, Derstappen IT:
 Am 20.05.2010 20:04, schrieb robert rottermann:
 Am 20.05.2010 19:34, schrieb Maik Derstappen, Derstappen IT:

 Am 20.05.2010 16:05, schrieb Jürgen Herrmann:
  
 On Thu, 20 May 2010 15:59:58 +0200, Patrick Gerken
 do3cc...@googlemail.com   wrote:


 On Thu, May 20, 2010 at 14:18, Jürgen Herrmann
 juergen.herrm...@xlhost.dewrote:


  
 hi there!

 as our zope2 zodb grows we experience more and more conflicts
 with long running transactions. so i'm going to rewrite these
 methods to commit transactions in batches - here my attempt
 to tackle this problem. the idea is to get a list of objects
 to be modified in this transaction, break it down to batches
 and commit after each batch was processed. to avoid zope's
 retry-on-conflict machinery and still have a chance to retry
 per batch transaction commits, the iteration over one batch
 is guarded by a try:except ConflictError: and a retry logic.



 Zope already has its own retry mechanism, maybe you might want to
 call your long running method multiple times, each time working on the
 next batch.


  
 in fact zope's retry machinery is kicking in too often which is a
 bad thing if the retried transaction runs for say 30min or so.

 having to gather the list of objects outside of zope, doing the
 batching there and calling into zope multiple times - i wanted
 to avoid that.

 i'd like to have all the logic contained in one zope method
 for the sake of simplicity on the caller's side (most of these
 are kicked off by cron jobs).

 jürgen


 take a look at http://pypi.python.org/pypi/affinitic.zamqp maybe it is a
 solution for you.
 You can deligate your jobs out of zope and get it back after some time.
 zamqp then fire an event and you subscribe this event to handle thie
 results.

 with kind regards
 Maik Derstappen

  
 maik,
 this looks interesting.
 just out of curiosity: how would one alert the user that a long running job 
 (say
 after some 10 minutes) has finished.
 does the client have to poll?
 or is there some magic push functionality?

 robert

 hi robert,
 
 zamqp has an process that continuously receive new message from his 
 message queue and call a callback method which fire the event, that you 
 can subscribe.
 
 see zamqp and carrot docs for more info ;)
 
 regards maik
 
thanks maik,
this I expected.
however (I assume) these are all things that happen on the server.
how do I push the all done event to the client?  the user will probably have
navigated to some different place.

robert

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope-DB] ConnectionStateError when accessing properties

2010-05-05 Thread robert rottermann
Hi there,

in a plone site where Data is partially maintained in a mysql db, I get a
ConnectionStateError when I try to access properties on the sit.

the error is as follows:

Time2010/04/25 15:10:28.998 GMT+2
User Name (User Id) beat (beat)
Request URL
http://www.energie-plattform.ch/data_folders/save_company_changes/save_company_changes
Exception Type  ConnectionStateError
Exception Value Shouldn't load state for 0x1cbe82 when the connection 
is closed

Traceback (innermost last):

* Module ZPublisher.Publish, line 119, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 42, in call_object
* Module wrapper, line 5, in wrapper
* Module kss.core.actionwrapper, line 238, in apply
* Module energiecluster.addresses.browser.company, line 465, in
save_company_changes
* Module energiecluster.addresses.Flag, line 400, in handleFlags
* Module energiecluster.addresses.Flag, line 542, in delFlagsFromObject
* Module energiecluster.addresses.Flag, line 572, in updateHooks
* Module energiecluster.addresses.Newsletteremail, line 248, in hookupFlags
* Module energiecluster.addresses.Newsletteremail, line 188, in 
_hockedupFlags
* Module energiecluster.addresses.Newsletteremail, line 216, in 
getHookedFlags
* Module ZODB.Connection, line 758, in setstate

ConnectionStateError: Shouldn't load state for 0x1cbe82 when the connection is
closed

the code that produces the error is the line
if not ep.hasProperty('newsletter_hooked_flags'):

in a call of the following method:

def getHookedFlags(self):
if not self.context:
return
pt = self.context.portal_properties
ep = getattr(pt.aq_inner.aq_self, 'energiecluster_properties', None)
if not ep:
ep = SimpleItemWithProperties(id='energiecluster_properties',
  title='energiecluster_properties')
pt._setObject('energiecluster_properties', ep)

if not ep.hasProperty('newsletter_hooked_flags'): - error here
values = [
'#language:Type:Flag1',
'#where type 0 = html, type 1 = text',
'de:0:ad_newsletter_de_html',
'de:1:ad_newsletter_de_text',
'fr:0:ad_newsletter_fr_html',
'fr:1:ad_newsletter_fr_text',
]
ep.manage_addProperty(id='newsletter_hooked_flags',
value=values, type='lines')
return  ep.getProperty('newsletter_hooked_flags')

unfortunately this happens only on the life site. I can not reproduce the error
in our test environment.

I would very much appreciate a hint how to circumvent that error.
thanks
robert
___
Zope-DB mailing list
Zope-DB@zope.org
https://mail.zope.org/mailman/listinfo/zope-db


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


[Zope-DB] ConnectionStateError when accessing properties

2010-04-26 Thread robert rottermann
Hi there,

in a plone site where Data is partially maintained in a mysql db, I get a
ConnectionStateError when I try to access properties on the sit.

the error is as follows:

Time2010/04/25 15:10:28.998 GMT+2
User Name (User Id) beat (beat)
Request URL
http://www.energie-plattform.ch/data_folders/save_company_changes/save_company_changes
Exception Type  ConnectionStateError
Exception Value Shouldn't load state for 0x1cbe82 when the connection 
is closed

Traceback (innermost last):

* Module ZPublisher.Publish, line 119, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 42, in call_object
* Module wrapper, line 5, in wrapper
* Module kss.core.actionwrapper, line 238, in apply
* Module energiecluster.addresses.browser.company, line 465, in
save_company_changes
* Module energiecluster.addresses.Flag, line 400, in handleFlags
* Module energiecluster.addresses.Flag, line 542, in delFlagsFromObject
* Module energiecluster.addresses.Flag, line 572, in updateHooks
* Module energiecluster.addresses.Newsletteremail, line 248, in hookupFlags
* Module energiecluster.addresses.Newsletteremail, line 188, in 
_hockedupFlags
* Module energiecluster.addresses.Newsletteremail, line 216, in 
getHookedFlags
* Module ZODB.Connection, line 758, in setstate

ConnectionStateError: Shouldn't load state for 0x1cbe82 when the connection is
closed

the code that produces the error is the line
if not ep.hasProperty('newsletter_hooked_flags'):

in a call of the following method:

def getHookedFlags(self):
if not self.context:
return
pt = self.context.portal_properties
ep = getattr(pt.aq_inner.aq_self, 'energiecluster_properties', None)
if not ep:
ep = SimpleItemWithProperties(id='energiecluster_properties',
  title='energiecluster_properties')
pt._setObject('energiecluster_properties', ep)

if not ep.hasProperty('newsletter_hooked_flags'): - error here
values = [
'#language:Type:Flag1',
'#where type 0 = html, type 1 = text',
'de:0:ad_newsletter_de_html',
'de:1:ad_newsletter_de_text',
'fr:0:ad_newsletter_fr_html',
'fr:1:ad_newsletter_fr_text',
]
ep.manage_addProperty(id='newsletter_hooked_flags',
value=values, type='lines')
return  ep.getProperty('newsletter_hooked_flags')

unfortunately this happens only on the life site. I can not reproduce the error
in our test environment.

I would very much appreciate a hint how to circumvent that error.
thanks
robert
___
Zope-DB mailing list
Zope-DB@zope.org
https://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-dev] Stepping back as Zope 2 release manager

2010-01-11 Thread robert rottermann
many thanks for the tremendous work you have done.
I always wondered how long your days must be ..

robert
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] New Zope 3 name: BlueBream

2010-01-04 Thread robert rottermann
Am 05.01.2010 08:13, schrieb Jan Ulrich Hasecke:
 
 Am 05.01.2010 um 00:43 schrieb Hermann Himmelbauer:
 Although I tend to give you right, as probably no one will get the fish 
 connection and therefore a new name has to be raised up, I vote for 
 BlueBream, as this indicates something very new, which frees itself from 
 those endless Zope 3, Zope 3 Application Server, Zope blah blah... 
 considerations.
 
 And getting an endless discussion about Zope, Zope Toolkit, Zope 2, Grok, 
 Bluebream, repoze.bfg … 
 
 I am just creating a German broschure about Zope and we are relaunching 
 zope.de these days, and I can tell you it is hell to explain what Zope is.
 
 What's in a name? I don't mind having a name for a reborn Zope 3 and 
 Bluebream   might be ok. 
 
 But we must keep an eye on our trademark Zope.  
 
 What is Zope if we have
 
 - Zope Toolkit 
 - Zope 2
 - Grok
 - Bluebream
 - BFG
 
 Seems that there is no Zope anymore.  ;-)
 
 juh
I agree,
we have two names that ar known to a wider audience:
Zope and Plone.

all the other items bear so little market value that even an insider can not
place them.

Therefore I think either of the two should be part of any new packages name
meant to be recognized by non Zope affectionados.

Bluebream for Zope
BlueZope
Bluebream gone Zope

what ever

robert
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope] ZopeProfiler uninstall

2009-12-01 Thread robert rottermann
Gaute Amundsen schrieb:
 We have ZopeProfiler 1.72 installed on a site (Zope 2.7.5-1.fc3) that
 don't need it anymore.
 I've removed the folder and deleted the product, but I cant' find a way
 to remove it form the controlpanel.
 I notice it's been asked once before, but I cant find any replies.

 Any hints?

 Regards

 Gaute Amundsen




 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope-dev )


   
go to the control panel (portal_controlpannel) in the zmi and delete it
robert
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] [Zope-Annce] ZClasses resurrected

2009-10-04 Thread robert rottermann
this is great,
I never used ZClasses. But I really cherish that somebody did speak up and keeps
on giving suport to parts of the zope ecosystem the rest of the community
stopped to maintain.
robert
 Dieter Maurer wrote:
 The Zope developers have ripped out the ZClasses functionality from
 the Zope core in version 2.12.

 As promised, I have collected the former code in a new package
 (dm.zopepatches.zclasses on PyPI). When imported, this package
 uses monkey patching to restore the ZClasses functionality.
 New tests verify the functionality as formerly described in the
 Zope book (2.7 edition).

 To make ZClasses available again,
 the ZODB root database requires dm.zopepatches.zclasses.ClassFactory
 as class-factory option in the Zope configuration file.
 When this option is processed, the package is imported
 and the monkey patching takes place.


 The current version does not yet restore the distribution functionality
 (of Zope products). Let me know when you need this functionality.

   
 ___
 Zope maillist  -  Zope@zope.org
 https://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope-dev )
 
 

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope-dev] Subversion externals versus mirroring

2009-09-09 Thread robert rottermann
Martijn Faassen schrieb:
 Hi there,
 
 Christian Theune wrote:
 a long-standing issue with our mirror of svn.zope.org are the absolute
 URLs of externals: they require the repository to be available on a
 given URL.

 I propose to use relative URLs for externals. I guess a complete update
 isn't necessary, but I'd like to improve the situation and start using
 them from now on. Maybe we should also put a commit hook in place as a
 safety belt?

 However, this requires Subversion 1.5 which we are using on the server
 already, but I don't know whether we assume clients are 1.5 or higher.
 
 I certainly still use a SVN 1.4.x client, being on Ubuntu 8.04 LTS 
 (released just last year). I don't think SVN 1.5 is common enough yet to 
 make such a move possible.

you still can use 1.4 clients an a 1.5 server I think..

robert
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope] how get a relative root from

2009-08-20 Thread robert rottermann
if you look in the request, there is
PATH_INFO
from which you can deduct the path you are using.

robert
Miguel Beltran R. schrieb:
 Hi list
 
 how can do a script what return the relative parent from it self?
 
 I use virtual_hosting and because a configuration I need access to my
 site like http://mysite or http://192.168.1.1/mysite.
 The problem is I have a _menu_ with absolute path, working fine using
 http://mysite but not the other way
 
 
 My actual menu is like this:
 ul id=nav
   li
 a href=/finanza/proyecto/Proyecto/a
 ul class=menu
lia href=/finanza/proyecto/altaAlta/a/li
lia href=/finanza/proyecto/busquedaBusqueda/a/li
 /ul
   /li
 /ul
 
 and need when is loaded from http://192.168.1.1/mysite
 ul id=nav
   li
 a href=/mysite/finanza/proyecto/Proyecto/a
 ul class=menu
lia href=/mysite/finanza/proyecto/altaAlta/a/li
lia href=/mysite/finanza/proyecto/busquedaBusqueda/a/li
 /ul
   /li
 /ul
 
 can someone say me how do it? thanks
 -- 
 
 Lo bueno de vivir un dia mas
 es saber que nos queda un dia menos de vida
 
 
 
 
 ___
 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 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] problem with commits in SQLAlchemyDA

2009-08-17 Thread robert rottermann
I do not see any reference to mark_changed
you have to call it before any transaction.commit() to tell the zope transaction
machinery that it has to commit you changes also.
robert

Maric Michaud schrieb:
 Hi all,
 
 I wanted to use SQALchemyDA with a standalone Zope 2.11 (we only depends 
 on CMFCore).
 
 i tried to get it up using easy_install, which is pretty 
 straightforward, once removed the incompatible zope.component package 
 needed in the dependencies.
 
 It ends up with the following installed packages (skipping zope 3 
 components) :
 zope.sqlalchemy-0.4-py2.4.egg
 z3c.sqlalchemy-1.3.10.1-py2.4.egg
 SQLAlchemy-0.5.5-py2.4.egg
 Products.SQLAlchemyDA-0.4.1-py2.4.egg
 
 At first glance, this works well, but the DA actually can't manage to 
 commit any sql requests (I try only for insert in Mysql and postgres but 
 I'm sure it's always true).
 
 This is quite an unexpectable behavior for a DA.
 
 I think the problem is related to this thread I found on tg-trunk 
 newsgroup :
 
 http://www.mail-archive.com/turbogears-tr...@googlegroups.com/msg07302.html
 
 There is a misleading comment in the docstring of 
 zope.sqlalchemy.datamanager.join_transaction speaking of a 
 DirtyAfterFlush SessionExtension, which I never seen except in plone code.
 
 In the last I finally manage to make it work by monkey patching 
 SQLAlchemyDA itself this way :
 
 
 try :
  from Products.SQLAlchemyDA import da
  from z3c.sqlalchemy import getSAWrapper, createSAWrapper
  if '0.4.1' in da.__file__ and not hasattr(da.SAWrapper,
'_patched__wrapper_property') :
  da.SAWrapper._patched__wrapper_property = da.SAWrapper._wrapper
 
  def _always_invalidated_wrapper(self):
  The property '_wrapper' patched by CFENet to correct what
  seems to be a bug in SQLAlchemyDA which prevents any
  commit.
  from zope.sqlalchemy.datamanager import STATUS_INVALIDATED
  if self.dsn:
  try:
  return getSAWrapper(self.util_id)
  except ValueError:
  return createSAWrapper(
self.dsn, forZope=True,
transactional=self.transactional,
engine_options={'convert_unicode' :
  self.convert_unicode,
'encoding' : self.encoding},
extension_options={'initial_state': # the whole
 # point is here
  STATUS_INVALIDATED},
name=self.util_id)
  return None
 
  da.SAWrapper._wrapper = property(_always_invalidated_wrapper)
 
 except ImportError :
  pass
 
 
 Anyone has any insights about this problem, any comments on my solution, 
 did it have been reported and corrected, or am I simply missing something ?
 
 

___
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] problem with commits in SQLAlchemyDA

2009-08-17 Thread robert rottermann
Maric Michaud schrieb:
 robert rottermann a écrit :
   I do not see any reference to mark_changed
   you have to call it before any transaction.commit() to tell the zope 
 transaction
   machinery that it has to commit you changes also.
   robert
  
 
 In fact, what I understood is that zope.sqlalchemy, by default, bypasses 
 the commit if status is not manually set as 'changed' (see the docstring 
 I quoted in my previous mail). The alternative is to build the 
 SessionExtension with initial_state == STATUS_INVALIDATED.
 
 My point is that it should be the default for a DA, as it is intended to 
 be used mainly by zsql methods which doesn't do nothing to the 
 transaction state.
 
 Maybe I wasn't clear but the patch works well with my existing zsql code.
 
it is a longtime that i worked with zsql methods.
however I think the difference is, that zsql handles transactions itself. it
wraps every zqls method in a start/end transaction. pair.

this is similarly done by zope.sqlalchemy. but it will only commit, when you
tell it that the session is dirty by calling mark_changed

import transaction
from zope.sqlalchemy import mark_changed.
here is how I use it
def addKtyp(self, form, commit=1):

create a new ktyp
return id of that ktyp

session = self.getSession()
...

if values:
...
if not ktyp:
...
session.add(ktyp)
# only mark the session, do not  yet commit
self.mark_changed()
if commit:
transaction.commit()
# we only know the id after a commit !!!
ktyp_id = ktyp.ktypid
return ktyp_id

robert
___
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-dev] RFC: Site - Locus

2009-05-28 Thread robert rottermann

 One reason Locus might be a bad word is because it's easily confused 
 with Location, a concept we already have.

an other one is that in german locus is often used for a place where you sit
down and use  paper to clean your back afterwards..

robert
___
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] ZTK futures: one big package?

2009-05-12 Thread robert rottermann
chris
you have *exactly* mirrored my feelings as a longtime zope2 user/application
developer getting in touch with plone3/five.
now after a year digging in it I still am not free of it

thanks a lot
robert

Chris McDonough schrieb:
 I realize now that I've neglected to give sufficient reasoning for why less 
 granular packaging would be a good thing.
 
 I've noticed that there's a common theme in Zope development, software, and 
 packages that I can only describe as power law development or turtles all 
 the 
 way down.  It's a bit of an antipattern, unfortunately.
 
 I'll provide an example by way of Zope-3-the-appserver.  In an application 
 that 
 uses Zope-3-the-appserver, many individual subframeworks will be used.  For 
 example, there is a traversal subframework, a security subframework, a 
 cataloging subframework, and so on.
 
 Each of these subframeworks acts as a logical unit, and through the magic of 
 the 
 component architecture, each can be replaced wholesale by registering some 
 adapter.  However, each of these subframeworks tend to also have settings 
 that 
 can be configured.  For example, individual traversal steps for certain types 
 of 
 objects can be overridden by registering an adapter that *configures* the 
 subframework.  In the case of Zope 3, we have a traversal situation where the 
 larger traversal subframework can either be replaced wholesale via an adapter 
 registration or extended piecemeal via other adapter registrations.
 
 The problem is that the mechanism to *replace* the subframework is the same 
 as 
 the mechanism to *configure* it (both are done via adapter registration, 
 sometimes even in the same file).  This is theoretically fine.  But in 
 reality, 
 it's tremendously hard for someone just walking up to a complex system like 
 Zope 
 3 to discern adapter registrations that replace subsystems from those which 
 merely configure subsystems.  An inability to discern the difference leads to 
 situations where people just don't get the joke and try to wiggle wires to 
 configure-to-death a existing subsystem that's clearly suboptimal for their 
 use 
 case instead of just replacing it wholesale with a much simpler custom 
 policy. 
 They just don't know it was engineered to be replaced.  So they keep adding 
 more 
 configuration code to the existing subframework to handle various 1% edge 
 cases. 
   Often this code makes the subframework tremendously complex, and the 
 subframework grows inappropriate dependencies along the way.  *Sometimes* the 
 situation gets so confusing for a new user, they just quit and go use 
 something 
 else.
 
 This is a pattern that happens over and over again in Zope development.  In 
 my 
 personal opinion, the original error was trying to make the subframework 
 configurable at all.  Instead, the subframework should be replaceable easily, 
 but it should itself be relatively rigid.  At very least, for subframeworks 
 that 
 really do require extra configuration (should be very few), this 
 configuration 
 should be done via highly specialized ZCML directives (or grokkers), as 
 opposed 
 to some very general adapter registration that can't be easily discerned from 
 other adapter registrations by a newbie.
 
 If the subframeworks were more rigid (but replaceable), the *intent* of the 
 subframework author could be more easily discerned, and fewer people would 
 fall 
 into the trap of adding more configuration code to a subframework instead of 
 just replacing it entirely.  And fewer people would just walk away in 
 frustration.
 
 What does this have to do with packaging?  Well, currently, there's a 
 dizzying 
 number of packages that make up the ZTK (nee Zope 3).  Each of these 
 packages is a pure peer of all others in a PyPI listing with no real way to 
 get 
 a sense of their relative importance other than performing a linear audit.  
 Even 
 if a user *does* do a linear search of all of them, it's still awful hard to 
 discern for some new user which ones are important, and which ones just 
 happen 
 to exist by some inequity of history without trying to install it.  The user 
 needs to gain some holistic knowledge of the system in order to discern the 
 important bits from these historical inequities.
 
 Most new users understandably just walk away from *all* Zope packages before 
 they gain this knowledge; it's just too hard for them to tell the difference 
 between the truly important and reusable bits and the stuff that just happens 
 to 
 be packaged up and released but which is useless outside of some highly 
 specific 
 context.  In effect, we just don't communicate *intent* very effectively in 
 our 
 current packaging structure.
 
 In my opinion, this is why a lot of Python developers who are otherwise very 
 smart have given up on trying to use Zope packages.  The time required to 
 figure 
 out which ones are useful and which ones aren't is just too high.  It's way 
 easier for them to write them all off 

Re: [Zope-dev] ComputedAttribute Object

2009-04-27 Thread robert rottermann
Sandrine Meyantchop schrieb:
 Hello,
 i want to know how i can convert a ComputedAttribute Object to a String.
 I have exactly the problem explain here:
 http://www.zope.org/Collectors/Ape/19
 but i want to have a string in state of a ComputedAttribute Object.
 Any Ideas??
 Sandra
 
 
 
 
 
 ___
 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 )
str(object) ??

___
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] ComputedAttribute Object

2009-04-27 Thread robert rottermann
Sandrine Meyantchop schrieb:
 i have only try with str, but the problem is that i want to have for
 example the title but str(self.title) return ComputedAttribute object at
 0xb7cdb8a0.
self.title() ??

 
 
 --- En date de : *Lun 27.4.09, robert rottermann /rob...@redcor.ch/* a
 écrit :
 
 De: robert rottermann rob...@redcor.ch
 Objet: Re: [Zope-dev] ComputedAttribute Object
 À: elsand...@yahoo.fr
 Cc: Zope-Dev@zope.org
 Date: Lundi 27 Avril 2009, 8h40
 
 Sandrine Meyantchop schrieb:
  Hello,
  i want to know how i can convert a ComputedAttribute Object to a String.
  I have exactly the problem explain here:
  http://www.zope.org/Collectors/Ape/19
  but i want to have a string in state of a ComputedAttribute Object.
 
  Any Ideas??
  Sandra
  
  
  
  
  
  ___
  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 )
 str(object) ??
 
 
 
 
 
 ___
 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 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] ComputedAttribute Object

2009-04-27 Thread robert rottermann
I do not know
try
Title
Title()
___
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] problem accessing object as anonymous

2009-04-22 Thread robert rottermann
Hi there,
I try to find out, why  in an intranet accessing an object from a link sendt by
email is not possible.
situation:
a user from a plone intranet sends a link to a dokument within the intranet to a
colleague.
if that colleague clicks on the link while *not logged* into the intranet she is
presented with the *browser* login box repeatedly. entering the credential does
not help.
the error log shows that access to the document is forbidden for the document
for the user Anonymous

while debugging I found out, that the __roles__ property of a given document is
a tuple of the form
('GroupMember', 'Guest', 'Manager', 'FolderManager', 'Owner')

if I copy the same document to a vanilla plone site its __roles__ property is
['Anonymous', 'Manager', 'Reviewer', 'Manager', 'Anonymous']


I have the impression, that when 'Anonymous' is part of __roles__, access to the
object is possible. without it, access fails.

now my questions:
is the assumption, that the failed acces is caused by the missing 'Anonymous'
role in __roles__ correct?

if yes: what controls the setting of __roles__

if not: what could be the reason of the fact, that users are not presented the
cookieCrumbler-base plone login is not presented?

thanks very much for your help
robert



___
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] problem accessing object as anonymous

2009-04-22 Thread robert rottermann
oh, I am using plone 2.5x here with Zope 2.9.8-final, python 2.4.6, linux2
robert
robert rottermann schrieb:
 Hi there,
 I try to find out, why  in an intranet accessing an object from a link sendt 
 by
 email is not possible.
 situation:
 a user from a plone intranet sends a link to a dokument within the intranet 
 to a
 colleague.
 if that colleague clicks on the link while *not logged* into the intranet she 
 is
 presented with the *browser* login box repeatedly. entering the credential 
 does
 not help.
 the error log shows that access to the document is forbidden for the document
 for the user Anonymous
 
 while debugging I found out, that the __roles__ property of a given document 
 is
 a tuple of the form
 ('GroupMember', 'Guest', 'Manager', 'FolderManager', 'Owner')
 
 if I copy the same document to a vanilla plone site its __roles__ property is
 ['Anonymous', 'Manager', 'Reviewer', 'Manager', 'Anonymous']
 
 
 I have the impression, that when 'Anonymous' is part of __roles__, access to 
 the
 object is possible. without it, access fails.
 
 now my questions:
 is the assumption, that the failed acces is caused by the missing 'Anonymous'
 role in __roles__ correct?
 
 if yes: what controls the setting of __roles__
 
 if not: what could be the reason of the fact, that users are not presented the
 cookieCrumbler-base plone login is not presented?
 
 thanks very much for your help
 robert
 
 
 
 ___
 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 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] problem accessing object as anonymous

2009-04-22 Thread robert rottermann

robert rottermann schrieb:
 Hi there,
 I try to find out, why  in an intranet accessing an object from a link sendt 
 by
 email is not possible.
 situation:
 a user from a plone intranet sends a link to a dokument within the intranet 
 to a
 colleague.
 if that colleague clicks on the link while *not logged* into the intranet she 
 is
 presented with the *browser* login box repeatedly. entering the credential 
 does
 not help.
 the error log shows that access to the document is forbidden for the document
 for the user Anonymous
 
 while debugging I found out, that the __roles__ property of a given document 
 is
 a tuple of the form
 ('GroupMember', 'Guest', 'Manager', 'FolderManager', 'Owner')
 
 if I copy the same document to a vanilla plone site its __roles__ property is
 ['Anonymous', 'Manager', 'Reviewer', 'Manager', 'Anonymous']
 

I found out more:
this dropping of 'Anonymous' and converting to a tuple only happens when I use
our own workflow.
if I use the standard plone workflow so I wonder, what can provoke this?

robert

 
 I have the impression, that when 'Anonymous' is part of __roles__, access to 
 the
 object is possible. without it, access fails.
 
 now my questions:
 is the assumption, that the failed acces is caused by the missing 'Anonymous'
 role in __roles__ correct?
 
 if yes: what controls the setting of __roles__
 
 if not: what could be the reason of the fact, that users are not presented the
 cookieCrumbler-base plone login is not presented?
 
 thanks very much for your help
 robert
___
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-dev] Zope 4.0, maybe not such a bad idea...

2009-04-13 Thread robert rottermann
Hi there,
this is an email I wanted to write for several times in the past.

I find it very sad, that grown up people that are extremely knowledgeable and
the source of lots of incredibly helpful advice *nobody* else seems to be able
or willing to give, contributers of a wealth of tools the whole zope community
would be worse off without, do not have the the *maturity* to withheld their
personal animosity.

if I would be their papa, I would threaten to smack their buts!

I would hate not to hear any of the well founded, albeit controversial opinions
some of us feel committed to share at times. Its a funny democracy that only
accepts divers forms of yes. *And doomed to fail*.

however I loath the stupid bickering that springs up as soon as any of a couple
of contributers deign not to be of the same opinion.


Grow up!

robert

___
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-dev] naming Zope

2009-04-08 Thread robert rottermann
I see no reason at all to rename anything.

remeber the days when there was dBase3. and then dBase4 came allong.
technically better but never took off ?
To the day things are either dBase or dBase3 compatible.

A simmilar situation we have with Zope.
Like dBase,  Zope is a base technology. How its named is not (very) 
important. Nobody but techies will be interested. And they  quickly will
learn what the different bits in the tool-chest are used for. What ever
they are named.

robert




Martijn Faassen schrieb:
 Hey,

 Okay, in the interests of making this discussion go quickly, there has 
 been enough negative feedback about renaming Zope 2 to think we have no 
 realistic chance of renaming it.

 We are still stuck with the following perceived sequence:

 Zope 2, Zope 3

 which implies that people should want to upgrade.

 How to get out of that bind? We could consider renaming Zope 3. Is there 
 any potential for this?

 I'll note that I don't think there's as much at risk here:

 Zope 2, Zope 3, Zope Framework.

 This isn't a progression that people want to upgrade to either, but it 
 may give the wrong impression.

 If we don't call Zope Framework 4.0, we'll be fine. We should call its 
 first release 1.0 and there's no implication of a progression.

 Regards,

 Martijn

 ___
 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 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] Mod_Rewrite port 8080

2009-04-06 Thread robert rottermann
Bobby schrieb:
 Hi,
 
 I want to use mod_rewrite on Apache to redirect http://internal:80/internal 
 to http://internal:8080/internal so that when the user request 
 http://internal:80/internal, the Zope folder foo will be served up. I still 
 want http://internal:80/ to stay intact so that the contents from port 80 
 will still be served; just the http://internal:80/internal to point to the 
 Zope folder http://internal:8080/internal. Hope that makes sense. Could 
 someone help me out with the syntax?  Tried the syntax below but not getting 
 desired results. Thanks!
 
 VirtualHost internal
 ServerName internal
 RewriteEngine On
 RewriteRule ^/(.*) 
 http://internal:8080/VirtualHostBase/http/internal:80/internal/VirtualHostRoot/$1
  [L,P]
 /VirtualHost
 
 
 
 
 
   
 ___
 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 )
 
 
go to plone.org
there are step by step examples.
you find them under dokumentation
robert
___
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] znolk wizard

2009-04-04 Thread robert rottermann
Chris Withers schrieb:
 Carsten Senger wrote:
 Times are fast moving. Interesting to see such interests in something 
 ancient to start an excavation ;-)

 Znolk 0.1.9 is hidden on zope.org.

 http://www.zope.org/Members/zwork/Znolk_SQL_Wizard/default

 I think 0.2 was developed at bluedynamics and never released.

 http://svn.bluedynamics.net/svn/public/ZnolkSQLWizard/
 
 Maybe whoever wants to use it could pick it up and do a public, 
 prominent release of the latest fixed version somewhere?
 
 Chris
 
I thought this could be a nice idea and had a look at the code.
Might be that it would not be hard. However this code is so crufty that I really
would not want to touch it.
Although not ttw and with the need of some coding, you can achieve a similar
result with buildout and collective.mercury.
I used this combination to create the needed forms for a postgres db with some
140 tables.

robert
___
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] znolk wizard

2009-04-02 Thread robert rottermann
take collective.mercury this generates intterfaces from every table.
with such an interface yaou need only a couple of lines to build an edit form
for every table.
somethings like:

class DeclarationKLView(formbase.PageForm):
form_fields = form.Fields(ItblDeclaration_klTable)
ignoreContext = True # don't use context to get widget data

#def __init__(self, *args, **kw):
#ItemAddForm.__init__(self, *args, **kw)

@form.action(_(uSend))
def action_send(self, action, data):
Send the email to the site administrator and redirect to the
front page, showing a status message to say the message was received.

self.ToWhatIsNeededToBeDone(..)

robert
ga...@schoolteachers.co.uk schrieb:
 Quoting Chris Withers ch...@simplistix.co.uk:
 
 ga...@schoolteachers.co.uk wrote:
 Does anybody have a recent-ish copy of Znolk wizard product or know where I
 could get hold of a copy. The original source no longer has it and 
 the one on
 the zope.org site is very old. In particular I would like it to 
 function with
 SQLite.
 Doesn't think generate SQL methods or something similarly old and crufty?
 
 Yes it is old, but it is the only reliable thing I've found to rapidly 
 generate
 database edit forms and csv up/download methods.
 
 I seem to remember this thing spitting out dtml...
 
 It generates dtml and ZSQLmethods reliably.
 
 Any reason you couldn't do what you want it to do as a seperate wsgi app?
 
 Yes, it is not used to generate finished apps, only prototypes and initial
 templates.
 Like my Ducati it's old, but like my Ducati it still works, and I'm not 
 going to
 throw the Ducati away just because it's old.
 
 
 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 )
 
 

___
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 to add existing folder in Zope

2009-03-28 Thread robert rottermann
thedag...@gmail.com schrieb:
 make that: LocalFS hasn't been updated since 2006.
it still works fine,
there is only a line you have to change in its code where it pulls in security
from cmf to some other cmf module. when starting up cmf tells you what is wrong.
so its really easy to fix.
robert

 
 There was a time when I would have agreed with you Jens, but the
 relentless changes to Zope has worn me down. Now I use what Plone uses
 and I only change zope versions when plone changes.
 
 
 
 On Mar 27, 2009 5:16pm, thedag...@gmail.com wrote:
  Telling someone to install all of Plone just to make filesystem
  content available seems insane, sorry. There are several products out
  there which can do the job, like LocalFS.

 LocalFS has been updated since 2006. There is nothing in the zope
 world that is as well maintained as plone. Sorry.


 
  iEYEARECAAYFAknNE78ACgkQRAx5nvEhZLLSZACgnouX6fbkoZjY1jI5KuER4iWt
 
  p40An1l92ewh+I0Gka3ak55qDlhWavQR
 
  =mqeJ
 
  -END 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 )
 
 
 
 
 
 ___
 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 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-dev] Overhauling the Zope 2 presentation on zope.org

2009-02-22 Thread robert rottermann
 hi andreas,
thank you very much for your efforts

 Concerning the look  feel: unless someone volunteers for taking over
 the responsibility for providing a Plone theme, I will step forward
 trying to coordinate this with the design efforts that are currently
 in progress for the relaunch of www.zope.de.
 

Assuming the consent of my colleagues (which I am sure to get) I would like to
offer cooperation with design of the new site.
such work should in any case be done on the base of what dzug is doing for the
dzug site.
I am sure we can take over responsibility at least during development. later
things might be reassigned.


robert
___
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] zope2docs

2009-02-21 Thread robert rottermann
thanks a lot for the effort that has been put into the new zope documentation.
I have a litte wish:
the colors of the index (light green on whit) is uncomfortable to my eyes and
hard to read.
maybe this could be changed to a more contrasting combination?
robert
Andreas Jung schrieb:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 In preparation for the upcoming Zope 2.12 release we reorganized the
 Zope 2 documentation:
 
 - - all related documentation is now maintained a restructured text
   document in SVN:
 
   svn+ssh://svn.zope.org/repos/main/zope2docs
 
 - - The Zope Book, The Zope Developers Guide and some ZODB
   articles have been converted from STX to ReST
 
 - - The Zope 2.12 doc folder has been restified and is included
   within the zope2docs folder through a svn:external
 
 - - The Zope 2 specific documentation including releases notes will
   be generated in the future using Sphinx from 'zope2docs2' and
   published on docs.zope.org
 
 Thanks to Hanno and Tres for reSTifying the Zope book and the ZDG.
 
 Andreas
 
 
 
 - -- 
 ZOPYX Ltd.  Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
 Web: www.zopyx.com - Email: i...@zopyx.com - Phone +49 - 7071 - 793376
 Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
 Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
 - 
 E-Publishing, Python, Zope  Plone development, Consulting
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (Darwin)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAkmgDVAACgkQCJIWIbr9KYyZMQCfShleZE5uqRL2f/UJvXxwkz8X
 QKoAmQHSNGC/mJMxxznzK79aAPidRc9k
 =Nw53
 -END 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 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-DB] assigning db engine dynamically/conditionally in tests

2009-01-15 Thread robert rottermann
Hi there,
I am using z3c.saconfig and zope.sqlalchemy to access an relational db.

Now I would like to use a different db schema for the test than for the real
thing.
I am usin a zcml stanza to define the the db:
configure xmlns=http://namespaces.zope.org/zope;
xmlns:browser=http://namespaces.zope.org/browser;
xmlns:five=http://namespaces.zope.org/five;
xmlns:i18n=http://namespaces.zope.org/i18n;
xmlns:db=http://namespaces.zope.org/db;
i18n_domain=energiecluster

  db:engine name=addresses.database url=mysql://r...@localhost/energie_3 /
  db:session name=energiecluster.addresses engine=addresses.database /

/configure

here my questions:
Is there a way to load such a stanza conditionally?

or can I just assign a new new engine to a session?

or is there an other way to achieve my goal?

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


Re: [Zope] sorting ids in python

2008-12-11 Thread robert rottermann
Garry Saddington schrieb:
 On Tuesday 09 December 2008 03:15, Andreas Jung wrote:
 On 08.12.2008 21:11 Uhr, robert rottermann wrote:
 Garry Saddington schrieb:
 Can anyone help me sort the following by id in a python script?

 for object in context.objectValues(['Folder', 'DTML
 Document','ZipFolder','File','Image']):
 objs=context.objectValues(['Folder',
 'DTMLDocument','ZipFolder','File','Image']) objs.sort()
 for o in objs:
   ..
 huh? Afaik there is no sort order defined on a per-object basis.

 This is my final working solution:
 
 ids = context.objectIds(['Folder', 'DTMLDocument','ZipFolder','File','Image'])
 ids.sort()
 for object in ids:
 object=context.restrictedTraverse(object)
 path=object.absolute_url()
 ...
I think you can have it a little bit easier:
use context.objectItems instead of objectIds
context.objectItems returns (id, object) tuples.

so your solution wold be:
objs = context.objectItems(['Folder', 
'DTMLDocument','ZipFolder','File','Image'])
objs.sort()
for id, object in objs:
 path=object.absolute_url()
robert
___
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] generic setupworkflow: how to add to binding??

2008-12-08 Thread robert rottermann
thanks Jean-Michel,

Jean-Michel FRANCOIS schrieb:
  bindings
   default
bound-workflow workflow_id=simple_publication_workflow/
   /default
 
 
   type type_id=File
 
 bound-workflow workflow_id=myworkflow/
 
   /type
 
this unfortunately *replaces* the entries in the binding.
I would like to add to the existing ones.

I can do that by running an old fasion install script but would prefere to do it
rigth.

thanks
robert

___
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] sorting ids in python

2008-12-08 Thread robert rottermann
Garry Saddington schrieb:
 Can anyone help me sort the following by id in a python script?
 
 for object in context.objectValues(['Folder', 'DTML 
 Document','ZipFolder','File','Image']):

objs=context.objectValues(['Folder', 'DTMLDocument','ZipFolder','File','Image'])
objs.sort()
for o in objs:
 ..

robert

 
 Import of sequence is not authorised in my python scripts, I am presuming 
 (probably wrongly) that sequence is needed for sort.
 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 )
 
 

___
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] sorting ids in python

2008-12-08 Thread robert rottermann
Andreas Jung schrieb:
 On 08.12.2008 21:11 Uhr, robert rottermann wrote:
 Garry Saddington schrieb:
 Can anyone help me sort the following by id in a python script?

 for object in context.objectValues(['Folder', 'DTML
 Document','ZipFolder','File','Image']):

 objs=context.objectValues(['Folder',
 'DTMLDocument','ZipFolder','File','Image'])
 objs.sort()
 for o in objs:
   ..
 
 huh? Afaik there is no sort order defined on a per-object basis.wh
I *allways* mixup objecItems with objectValues
so its objecItems(..).sort() ..
robert
___
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 manage error with zsql

2008-12-06 Thread robert rottermann
hi,

I think you should  write in a python script:

try:
  result = context.insert_data.zsql
  msg = 'data inserted'
except ZeroDivisionError:
  msg = 'ZeroDivisionError occured'

return msg

and in your tal you write:

 div
tal:content=context/MyPythonscript

 /div


allways try to put logic in a python script. it is *far* easier than writing
complicated tal

robert

Miguel Beltran R. schrieb:
 I tried to insert data using an zsql, insert fine How manage error with
 zsql.
 Before
 dtml-try
dtml-call insert_data
Data inserted!!!
 dtml-except
Error type:dtml-var error_type
Error type:dtml-var error_value
 /dtml-try
 
 
 
 Now (All files are ZPT)
 
 [index_html]
 ...
 form action=proyecto_alta.html
 input type=text name=field1 id=field1 /
 ...
 input type=text name=field2 id=field2 /
 /form
 
 
 [proyecto_alta.html]
 div tal:on-error=structure here/error_insertar
tal:condition=context/insert_data.zsql
tal:content=string: Data inserted!!!
 
 /div
 
 
 [error_insertar]
 error=_['error']
 if error.type==ZeroDivisionError:
 return pCan't divide by zero./p
 else:
 return pAn error ocurred./p
   pError type: %s/p
   pError value: %s/p % (error.type,
error.value)
 
 
 But say
 
 Tipo  Unauthorized
 Valor You are not allowed to access 'type' in this context
 TraceBack 
 
 Traceback (innermost last):
 
 * Module ZPublisher.Publish, line 119, in publish
 * Module ZPublisher.mapply, line 88, in mapply
 * Module ZPublisher.Publish, line 42, in call_object
 * Module Shared.DC.Scripts.Bindings, line 313, in __call__
 * Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
 * Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec
 * Module Products.PageTemplates.ZopePageTemplate, line 427, in pt_render
 * Module Products.PageTemplates.PageTemplate, line 96, in pt_render
 * Module zope.pagetemplate.pagetemplate, line 115, in pt_render
 * Module zope.tal.talinterpreter, line 271, in __call__
 * Module zope.tal.talinterpreter, line 346, in interpret
 * Module zope.tal.talinterpreter, line 981, in do_onError_tal
 * Module zope.tal.talinterpreter, line 346, in interpret
 * Module zope.tal.talinterpreter, line 745, in do_insertStructure_tal
 * Module Products.PageTemplates.Expressions, line 199, in
   evaluateStructure
 * Module zope.tales.tales, line 696, in evaluate
   *URL: /ceed/finanza/proyecto/proyecto_alta.html*
   *Line 1, Column 0*
   *Expression: PathExpr standard:u'here/error_insertar'*
   *Names:*
 
   {'container': Folder at /ceed/finanza/proyecto,
'context': Folder at /ceed/finanza/proyecto,
'default': object object at 0x0075A528,
'here': Folder at /ceed/finanza/proyecto,
 
'loop': {},
'nothing': None,
'options': {'args': ()},
'repeat': Products.PageTemplates.Expressions.SafeMapping object at 
 0x02382828,
'request': HTTPRequest, 
 URL=http://sic/finanza/proyecto/proyecto_alta.html,
 
'root': Application at ,
'template': ZopePageTemplate at 
 /ceed/finanza/proyecto/proyecto_alta.html,
'traverse_subpath': [],
'user': User 'admin'}
 
 * Module zope.tales.expressions, line 217, in __call__
 * Module Products.PageTemplates.Expressions, line 139, in _eval
 * Module Products.PageTemplates.Expressions, line 91, in render
 * Module Products.PageTemplates.ZRPythonExpr, line 79, in call_with_ns
 * Module Shared.DC.Scripts.Bindings, line 327, in
   __render_with_namespace__
 * Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
 * Module Products.PythonScripts.PythonScript, line 327, in _exec
 * Module None, line 2, in error_insertar
   *PythonScript at /ceed/finanza/proyecto/error_insertar*
   *Line 2*
 
 Unauthorized: You are not allowed to access 'type' in this context
 
 
 
 (Example taked from
 http://www.plope.com/Books/2_7Edition/AppendixC.stx#2-28
 http://www.plope.com/Books/2_7Edition/AppendixC.stx#2-28)
 
 
 -- 
 
 Lo bueno de vivir un dia mas
 es saber que nos queda un dia menos de vida
 
 
 
 
 ___
 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 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] how to access database declared in configure.zcml

2008-10-31 Thread robert rottermann
Hi there,

I am using collective tin.
the new version users z3c.saconfig.

to use it I have to declare the database in the configure.zcl like this:
db:engine name=declarations.database
url=mysql://[EMAIL PROTECTED]/energie echo=True /
db:session name=energiecluster.eccontent.platforms   
engine=declarations.database /

I need this database at some place in my code.
How can I access it.

What I am looking for is some kind of getUtilitty(db)

second question:
where would I find what is defined in:
xmlns:db=http://namespaces.zope.org/db

http://namespaces.zope.org is not a valid link..


thanks for any pointers
robert

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


Re: [Zope] Zope error getting Plone running on HP UX

2008-09-13 Thread robert rottermann
I have not been near HP UX for more than 10 years..
but why dont you install zope plone from scratch?

this is very easy and done in less than an hour.
you then should have much more controll on what is happening when running 
zope/plone.
start with installing:
- easy_install
- ZopeSkell

and the creat a buildout with paster.
there are good tutorials on plone.org on how to do that.
robert

sjcurt02 schrieb:
 I've used the Plone-3.1.5.1-ex-UnifiedInstaller to install all necessary
 components on an HP-UX B.11.11 U 9000/800/L3000-8x system.  The Zope control
 pannel displays the following:
 
 Zope Version: (Zope 2.10.6-final, python 2.4.5, hp-ux11)
 Python Version: 2.4.5 (#1, Sep 5 2008, 13:21:39) [GCC 3.3.2]
 System Platform: hp-ux11
 SOFTWARE_HOME: /public/plone/zinstance/parts/zope2/lib/python
 ZOPE_HOME: /public/plone/zinstance/parts/zope2
 INSTANCE_HOME: /public/plone/zinstance/parts/instance
 CLIENT_HOME: /public/plone/zinstance/var/instance
 Network Services: ZServer.HTTPServer.zhttp_server (Port: 9080)
 Process Id: 14823 (5)
 Running For: 4 min 54 sec
 
 Accessing the Plone site results in a bus error and core dump.  Verbose
 debugging shows:
 
 snip
 # trying
 /public/plone/buildout-cache/eggs/plone.keyring-1.2-py2.4.egg/plone/keyring/random.sl
 # trying
 /public/plone/buildout-cache/eggs/plone.keyring-1.2-py2.4.egg/plone/keyring/randommodule.sl
 # trying
 /public/plone/buildout-cache/eggs/plone.keyring-1.2-py2.4.egg/plone/keyring/random.py
 # trying
 /public/plone/buildout-cache/eggs/plone.keyring-1.2-py2.4.egg/plone/keyring/random.pyc
 # trying
 /public/plone/buildout-cache/eggs/plone.contentrules-1.1.0-py2.4.egg/plone/contentrules/engine/storage.sl
 # trying
 /public/plone/buildout-cache/eggs/plone.contentrules-1.1.0-py2.4.egg/plone/contentrules/engine/storagemodule.sl
 # trying
 /public/plone/buildout-cache/eggs/plone.contentrules-1.1.0-py2.4.egg/plone/contentrules/engine/storage.py
 #
 /public/plone/buildout-cache/eggs/plone.contentrules-1.1.0-py2.4.egg/plone/contentrules/engine/storage.pyc
 matches
 /public/plone/buildout-cache/eggs/plone.contentrules-1.1.0-py2.4.egg/plone/contentrules/engine/storage.py
 import plone.contentrules.engine.storage # precompiled from
 /public/plone/buildout-cache/eggs/plone.contentrules-1.1.0-py2.4.egg/plone/contentrules/engine/storage.pyc
 # trying /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/base64.sl
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/base64module.sl
 # trying /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/base64.py
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/base64.pyc
 sh: 702 Bus error(coredump)
 # clear __builtin__._
 # clear sys.path
 snip
 
 But a small test program that imports all the ZPublisher modules results in
 the following:
 
 snip
 # trying /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/socket.sl
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/socketmodule.sl
 # trying /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/socket.py
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/socket.pyc
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/mimetools.sl
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/mimetoolsmodule.sl
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/mimetools.py
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/mimetools.pyc
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/httplib.sl
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/httplibmodule.sl
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/httplib.py
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/httplib.pyc
 # trying /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/base64.sl
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/base64module.sl
 # trying /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/base64.py
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/base64.pyc
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/urlparse.sl
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/urlparsemodule.sl
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/urlparse.py
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/urlparse.pyc
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/HTTPRangeSupport.sl
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/HTTPRangeSupportmodule.sl
 # trying
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/HTTPRangeSupport.py
 #
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/HTTPRangeSupport.pyc
 matches
 /public/plone/zinstance/parts/zope2/lib/python/ZPublisher/HTTPRangeSupport.py
 import ZPublisher.HTTPRangeSupport # precompiled from
 

Re: [Zope] zexp import fails from linux to windows due to image file paths

2008-07-16 Thread robert rottermann

Richard Ettema schrieb:

Hi,

I have an old zope based site that was hosted on a linux machine that 
was exported to a zexp. i am trying to import it onto a windows machine 
to fix up and upgrade the site. the windows machine is setup wth the 
identical products etc. The problem is the image file paths for linux 
within the zexp do not match the new windows setup. I dont need the 
images imported, i'm wanting to access the main site content and users. 
I dont have access to a linux machine anymore, so i'm stuck with windows 
for development. Is there a way of getting the import procedure to 
ignore the errors and continue the import (i.e. any hints on how to 
modify the zope code)? Or is there a way to edit the zexp to do a search 
 remove/replace of the file path names so the import completes with no 
file path details?


Any ideas greatly appreciated as I have searched around with no luck on
answering this myself.

i do not think that it is the zexp import machinery that fails but the product 
that handles these external images. so you have to fix that product that it does 
not chocke when it can not read a file.


robert
___
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] how to unindex an non existing (deleted)object

2008-06-24 Thread robert rottermann

Hi there,

Sometimes a catalog query returns brains that point to non existing objects.

how can I remove such brains from the index programmatically  without using the 
portal_catalag/advanced/update tab?


thanks
robert
___
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 to unindex an non existing (deleted)object

2008-06-24 Thread robert rottermann

Martijn Jacobs schrieb:

robert rottermann wrote:

Hi there,

Sometimes a catalog query returns brains that point to non existing 
objects.


how can I remove such brains from the index programmatically  without 
using the portal_catalag/advanced/update tab?


thanks
robert
If you want to call the update catalog functionality yourself : A 
Zcatalog has a method refreshCatalog which you can use (take a look at 
ZCatalog.py).


If you want to remove the brain you could call the 
_catalog.uncatalogObject method.However, when you have brains which 
point to non-existent objects you should reindex the catalog, as 
something went wrong while (un)indexing these objects.



Martijn.



thanks very much.
robert
___
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: how to unindex an non existing (deleted)object

2008-06-24 Thread robert rottermann

Daniel Nouri schrieb:

robert rottermann writes:

  

Sometimes a catalog query returns brains that point to non existing objects.

how can I remove such brains from the index programmatically  without
using the portal_catalag/advanced/update tab?



  brain.aq_parent._catalog.uncatalogObject(brain.getPath())


Daniel

  

brilliant, exactly what I needed
thanks
robert
___
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] not possible to download anything

2008-06-13 Thread robert rottermann

Hi there,

after the dislocation of the zope servers zope.org is reachable again 
from where I am (switzerland)

however it is not possible to download anything.

robert

___
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] statistics and click analysis for a plone site

2008-06-02 Thread robert rottermann

Hi there,
for a Client using a plone2 intranet (with no access from the outside 
world) I installed awstat to track the usage of the intranet.

now I wonder how meningfull such statisics are.

The intranet usage is roughly as follows:
- user logs into the intranet authenticating against a 
Ldap/MSActiveDirectory

- she stays in the intranet all day, probably never logs out
- collects data as needed

The awstats setup is very basic. I just installed it and adopted the 
config files such that it finds the apache log files.
I did a second setup for the Z2.log (to get at the old data, as we do 
not rotate the Z2.log).


Looking at the awstats statistics I do not find them of overwhelming 
informative.
Now, I now awstats is not a click analysis tool. but maybe somebody has 
done some more analysis into how to provide useful statistics on the 
usage of an intranet.

Any pointers would be welcome.

thanks
robert
___
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] statistics and click analysis for a plone site

2008-06-02 Thread robert rottermann

Andreas Jung schrieb:



--On 2. Juni 2008 07:22:06 -0400 Tom Von Lahndorff [EMAIL PROTECTED] 
wrote:



Highly recommend Google Analytics:
http://www.google.com/analytics/
I've used it myself to track usage for a zope intranet which is only
accessible on an internal network.


Do you really want to send intranet-related data to Google? :-)

Andreas

this is exactly why google analytics is no option (unfortunately).
robert
___
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] statistics and click analysis for a plone site

2008-06-02 Thread robert rottermann

Tom Von Lahndorff schrieb:

Highly recommend Google Analytics:
http://www.google.com/analytics/
I've used it myself to track usage for a zope intranet which is only
accessible on an internal network.

On Mon, Jun 2, 2008 at 6:52 AM, robert rottermann [EMAIL PROTECTED] wrote:

thanks, but the customer does not like the idea of having data on a public site.
robert
___
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] buildout for plone2.5: paster creates bad zcml

2008-05-28 Thread robert rottermann

Hi there,
I try to use paster for a plone 2.5 site.

this is what I have done:

paster create -t plone2.5_buildout plone2
executed bootstrap and buildout
then in src:
paster create -t plone2.5_theme x.y

which I added to the buildout.cfg like so:
[buildout]
...
eggs =
   elementtree
   x.y

develop =
   src/x.y

...
[instance]
...
zcml =
   x.y


when I then start the new instance, I get the following error:
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File 
/home/zope/plone2/parts/instance/etc/site.zcml, line 11.2-11.55
   ZopeXMLConfigurationError: File 
/home/zope/plone2/parts/instance/etc/package-includes/001-x.y-configure.zcml, 
line 1.0-1.47
   ZopeXMLConfigurationError: File 
/home/zope/plone2/src/x.y/x/y/configure.zcml, line 8.2
   ConfigurationError: ('Unknown directive', 
u'http://namespaces.zope.org/five', u'registerPackage')


what can I do to fix this?
thanks
robert
___
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] buildout for plone2.5: paster creates bad zcml

2008-05-28 Thread robert rottermann

for the record:
I found a way to fix this by using a newer five versin.
I added:
urls =
   http://codespeak.net/z3/five/release/Five-1.4.4.tgz
in the buildout.cfg.

it would be much nicer, to have the buildout recipes fixed

robert

robert rottermann schrieb:

Hi there,
I try to use paster for a plone 2.5 site.

this is what I have done:

paster create -t plone2.5_buildout plone2
executed bootstrap and buildout
then in src:
paster create -t plone2.5_theme x.y

which I added to the buildout.cfg like so:
[buildout]
...
eggs =
   elementtree
   x.y

develop =
   src/x.y

...
[instance]
...
zcml =
   x.y


when I then start the new instance, I get the following error:
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File 
/home/zope/plone2/parts/instance/etc/site.zcml, line 11.2-11.55
   ZopeXMLConfigurationError: File 
/home/zope/plone2/parts/instance/etc/package-includes/001-x.y-configure.zcml, 
line 1.0-1.47
   ZopeXMLConfigurationError: File 
/home/zope/plone2/src/x.y/x/y/configure.zcml, line 8.2
   ConfigurationError: ('Unknown directive', 
u'http://namespaces.zope.org/five', u'registerPackage')


what can I do to fix this?
thanks
robert
___
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 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] Check for currently loged in users

2008-04-29 Thread robert rottermann

vaibhav pol schrieb:


Dear all,
 here i am using zop-2.8.1 and am trying to get the how many users 
currently loged in  zope. Let me know if zope having any  supported 
function or module to do the same .


to my knowledge there is no such tool.
the logged in user is not a state kept by the server, so there is 
nothing the server can tell you.


robert

 
thanks and regards

vaibhav




___
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 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] zopedown

2008-04-26 Thread robert rottermann

I remeber a similar situation some times ago with a customer.
them one of the apache logs grew to a size of 2gig wich was the maximum 
size apache can handle.

it just stoped to process any request.
deleting the log file was enough to have everything working
robert
Ben schrieb:

A Zope server stopped responding to requests, with page requests just timing 
out, but fortunately (I thought) I had the debugger URL ready.  However, when I 
loaded that I was amazed to see it load instantly, showing the usual 4 threads. 
  I restarted Zope, and now the debugger shows only:

Threads traceback dump at 2008-04-25 23:30:12

End of dump

In Unix, I see the usual two Zope processes.  Their CPU usage is very low.
 17633 ?S  0:184640842280  0.0  0.3 /usr/local/bin/python 
/www/Zope-2.7.3b2-0/lib/python/Zope/Startup/run.py -C /ww
 17632 ?S  0:00 8192 3768  0.0  0.1 /usr/local/bin/python 
/www/Zope-2.7.3b2-0/lib/python/zdaemon/zdrun.py -S /www/Z

The event log has nothing unusual, and ends with Zope Ready to handle requests
What can I do?
___
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 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 configuration HOWTO

2008-04-22 Thread robert rottermann

David Bear schrieb:
I'm trying to find more documentation about all the configuration 
parameters for a zeo.conf


I *believe* on plope.org there was an introduction to it with some more 
parameters explained.


Namely, I have a zope with multiple zodb's and mount points. I am trying 
to learn how to migration a single zope instance with multiple mounts 
into zeo. One thing I don't understand is temporary storage. If I have


zodb_db temporary
# Temporary storage database (for sessions)
temporarystorage
  name temporary storage for sessioning
/temporarystorage
mount-point /temp_folder
container-class Products.TemporaryFolder.TemporaryContainer
/zodb_db

in zope.conf -- how do and transfer that into zeo.conf and modify the 
zope.conf to properly understand.

this is where volatile thing are created and purged again.
there is never anything to migrate from here


specifically, do I put 'container-class' in zeo.conf ?


there is a howto on this on either zope.org or (more probably) on plone.org



Also, in zope.conf what do 'server', 'storage', 'name', and 'client' map 
to in zeo.conf? There must be a more detail descriptions of how to 
configure zeo somewhere.


--
David Bear
College of Public Programs at ASU
602-464-0424




___
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 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: [Plone-developers] the grand reunion

2008-04-14 Thread robert rottermann

Rudá Porto Filgueiras schrieb:

On Fri, Apr 11, 2008 at 1:23 PM, Florian Friesdorf [EMAIL PROTECTED] wrote:

Hi Robert,


 On Fri, Apr 11, 2008 at 04:04:43PM +0200, robert rottermann wrote:
  hi yuri,
 
  when setting up a zope/zeo task and everything was still a bit of a
  challenge (at least to me) we tended to have everything in one big
  instance that served some 20 low traffic sites.
  since then setting up a site with all the tools it needs has become a
  trivially easy and quick to execute task. we have converted nearly all
  these sites to have their own instance.
 
  I would not do it differently anymore ..

 Do you have or are there any comparisons for RAM usage of one zope instance
 containing multiple plone instances vs. multiple zope instances containing a
 single plone instance only?


It will be overkill. ;-)
We run all Plone sitess in same instance as possible (plone provider),
only creating one data.fs to each Plone Site and tunning cache objects
to each site needs.



you might be right,
is is an overkill when you start. just creating a new folder and a new 
plone site in it is *so* easy.
however, every site has its own lifecycle and tends to call for extra 
products, adaptations, plone  product versions, you name it. every such 
change affects every site in a one zope/several plone site setup.
and even if the change migth be trivial, it can have unwanted side 
effects for an other site.

my experience is: dont do it!

robert
___
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: [Plone-developers] the grand reunion

2008-04-11 Thread robert rottermann

hi yuri,

when setting up a zope/zeo task and everything was still a bit of a 
challenge (at least to me) we tended to have everything in one big 
instance that served some 20 low traffic sites.
since then setting up a site with all the tools it needs has become a 
trivially easy and quick to execute task. we have converted nearly all 
these sites to have their own instance.


I would not do it differently anymore ..

robert

Yuri schrieb:

Hi!

 Actually I've two Plone working envinronment and one zope, each in a 
different machine:


 - one, with two zope 2.9 istances (one for developing), running both 
multiple Plone 2.5 instances

 - one, with zope 2.9, running multiple Plone 2.5 instances
 - one, with zope 2.7.9, running zope only applications

 We have bought big iron hardware now, where I can do almost 
everything (with a fiber channel network storage, multiple rack servers).


tipically, I use one instance to develop, and one to deploy. This mean 
different zope instances which shares only the base, and having 
different products.


I would like to have an easy way to develop without having to be subject 
to dependencies from other envinroment, minimize the effort to mantain 
it and focus on doing things :)


 Is one big zope installation, with multiple instances, well suited for 
this tasks? Or is better different zope versions? What about the various 
Data.fs, is better to have them separated by application or by zope 
envinroment? I mean all the Plone in a single Data.fs or each one in a 
separated Data.fs?


 So, what is the best approach to migrate the three servers?

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

___
Plone-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/plone-developers




___
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: zip files corrupted with IE when opened, fine when downloaded

2008-03-19 Thread robert rottermann
Maurits van Rees schrieb:
 robert rottermann, on 2008-03-17:
 Hi there,
 we have a problem with an intranet that runs using plone 2.5.3

 when users using IE want to open a zip file from the intranet by using
 the open option from the download dialog they get winzip complaining
 that the file is corrupted.
 if they select save from the same dialog they can open the zip archive
 without problem.

 does anyone know a solution for this or give me an idea where to look
 for one?
 
 The INSTALL.txt of CMFPlone says this about WinZip:
 
 * Unpacking the Plone archive with WinZip will not work: WinZip will truncate
   filenames without warning you. 7-Zip is a good open source alternative for
   Windows that you can use instead: http://www.7-zip.org
 
 That does not look like the same error you are getting, so the other
 answers are probably better, but still using 7-zip might solve this.
 
 My 2 cents.
 
thanks maurits
it would be enough to use Firefox ..
but it's an intranet users spread all over europe and company policy is
IE only ..
robert
___
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] zip files corrupted with IE when opened, fine when downloaded

2008-03-19 Thread robert rottermann
Chris Withers schrieb:
 robert rottermann wrote:
 Hi there,
 when users using IE want to open a zip file from the intranet by using
 the open option from the download dialog they get winzip complaining
 that the file is corrupted.
 if they select save from the same dialog they can open the zip archive
 without problem.
 
 Sounds like you have a .tar.gz being served with an incorrect content
 type such that IE stupidly saves it as a .tar which then gets passed to
 WinZip, which doesn't look at the content of the file and so tries to
 open the .tar.gz as if it was a .tar and so barfs...
 
 cheers,
 
 Chris
 
thanks,
but its a *.zip file. and it is when opening in the window that springs
up at the end of the download.
when it is saved and then opened all is fine

robert
___
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] zip files corrupted with IE when opened, fine when downloaded

2008-03-17 Thread robert rottermann
Hi there,
we have a problem with an intranet that runs using plone 2.5.3

when users using IE want to open a zip file from the intranet by using
the open option from the download dialog they get winzip complaining
that the file is corrupted.
if they select save from the same dialog they can open the zip archive
without problem.

does anyone know a solution for this or give me an idea where to look
for one?

thanks
robert

___
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] zip files corrupted with IE when opened, fine when downloaded

2008-03-17 Thread robert rottermann
thanks Jim
I'll try that

robert

Jim Washington schrieb:
 Jim Washington wrote:
 robert rottermann wrote:
 Hi there,
 we have a problem with an intranet that runs using plone 2.5.3

 when users using IE want to open a zip file from the intranet by using
 the open option from the download dialog they get winzip complaining
 that the file is corrupted.
 if they select save from the same dialog they can open the zip archive
 without problem.

 does anyone know a solution for this or give me an idea where to look
 for one?
   
 I had a similar problem with pdf files, and googling indicated that IE
 might be deleting the cached copy of the document before the opening
 application can get to it.

 I have had some success setting cache control to private.  Something
 like:

 request.response.setHeader('cache-control','private')

 private,must-revalidate may also be a good value, depending on your
 situation.

 I Googled back through and found that the problem usually manifests when
 you have a 'cache-control':'no-cache' header.  The above explanation was
 not quite right.
 
 Anyway, either removing the no-cache header or using one that allows
 the local machine to keep a copy should work, if the problem is in fact
 a 'no-cache' header.
 
 - Jim Washington
 ___
 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 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 Zeo Performance

2008-03-15 Thread robert rottermann
FuBuJo schrieb:
 I apologize that my description was so confusing.
 I appreciate the feedback and so would like to clarify.
 
 The diagram is how the traffic flows.  So we have:
 Step 1 - a Load Balancer that passes traffic to Apache
 
 Step 2 - Apache which uses mod_proxy to obfuscate the URL and proxies traffic 
 to
 the Zeo Client
is that so?
does not apache talk to a zope server ?

robert

___
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 starts in foreground but not normaly

2008-03-11 Thread robert rottermann
Hi there,

after a software upgrade (system and zope/plone) we have a strange problem.
we have an old site that runs under plone 2.1
Zope-2.8.9-final
python 2.3.5

when I start it in the foreground with bin/zopectl fg everything works fine.
if I however start it with bin/zopectl start

bin/zopectl status shows after some seconds

[EMAIL PROTECTED]:~ instances/kanneweb3/bin/zopectl start
daemon process started, pid=26697

[EMAIL PROTECTED]:~ instances/kanneweb3/bin/zopectl status
daemon manager running; daemon process not running
[EMAIL PROTECTED]:~

I see no entries in the logs, so I have no idea where to look.

for any hints how the caus of this problem, I would be gratefull

robert


This is what the controllpanel shows:
Zope Version

(Zope 2.8.9-final, python 2.3.5, linux2)
Python Version

2.3.5 (#3, Mar 11 2008, 10:14:33) [GCC 4.1.2 20061115 (prerelease) (SUSE
Linux)]
System Platform

linux2
SOFTWARE_HOME

/home/zope/Zope-2.8.9-final/lib/python
ZOPE_HOME

/home/zope/Zope-2.8.9-final
INSTANCE_HOME

/home/zope/instances/kanneweb3
CLIENT_HOME

/home/zope/instances/kanneweb3/var
Network Services

ZServer.HTTPServer.zwebdav_server (Port: 8290)
ZServer.HTTPServer.zhttp_server (Port: 8280)
Process Id

26719 (-1229186160)
Running For

1 min 21 sec
___
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 starts in foreground but not normaly

2008-03-11 Thread robert rottermann
Chris Withers schrieb:
 robert rottermann wrote:
 [EMAIL PROTECTED]:~ instances/kanneweb3/bin/zopectl status
 daemon manager running; daemon process not running
 [EMAIL PROTECTED]:~

 I see no entries in the logs, so I have no idea where to look.
 
 Check the ownership of the log files.
 
 When this happens to me, it's usually because the user zope is running
 as doesn't have permission to write to the log files or the Data.fs or
 the var directory...
 
 cheers,
 
 Chris
 
thanks
this is not the reason. zope runs as the user that created the whole
instance.

after zope stopped two files are left in the var directory:
Z2.pid, Z2.lock
both containing an int that was probably the pid of the crashed zope.

any more ideas?

robert
___
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] Help me.

2008-03-11 Thread robert rottermann
Cu Vinh Loc schrieb:
   Dear friends,
 
   I am using plone for deploying the website, but I have some problems
 such as:
- Using relational (internal) database Gadfly database: I do not know
 where the database is stored in the Zope. Can I manipulate directly
 this database visual?
- Users and groups: How to assign this permissions to my website.
 
   Could you show me how to implement that easily.
 
   Cheers,
   Cu Vinh Loc.
 
 
 
 ___
 Zope-DB mailing list
 Zope-DB@zope.org
 http://mail.zope.org/mailman/listinfo/zope-db
 
 
gadfly is stored in the var directory of your zope instance.
however I belive it is not supported anymore.

user and groups:
in your instance go to confiration  (using your browser to access a
running plone).
there you find users ang groups.

for every object (a document, a folder) you can define who (what
user/group) has what permission. this you do using the sharing tab.

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


Re: [Zope] Happy Valentine's Day from Zwiki HQ

2008-02-15 Thread robert rottermann
Simon Michael schrieb:
 Hello Zopistas.. a happy Valentine's day to all!
 
as martin said (or hinted) before me, a new wiki solution needs to be
seamlessly integratable into plone.

I like zwiki very much and still use it often. but rarely in new projects.
the userinterface is to different from plone.

thanks for the incredible useful zwiki you provided us with.

if you move towards something plonelike, I would be happy to help.

robert
___
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-PAS] zmi navigation very slow when using LDAPMultiplugins

2008-01-21 Thread robert rottermann
Hi there,

we support a plone-based intranet that authenticates against an
ActiveDirectory-Domain.

As long as a user is logged into the plone-site this works fine.
However, the patches for LDAPMultiplugins that are needed for plone make
the installation of a  LDAPMultiplugins  into Zopes's root acl_users
problematic (or impossible). We can therefore not authenticate the zope
admins against ldap.

The problem we face is that navigation in the zmi becomes abysmally slow
as soon as a user that did not authenicate against plones acl_user
enters a plone site (it can take a couple of minutes to render the
content of a root folder).

its seems that for every access of a protected object the AD is
consulted first. only when all the ldap server where consulted the
standard consulting of the upper-level-acl_users take place.

now my question:
is there a way to have plone working, and configure the plugins of its
acl_users such, that users of an upper-level acl_users are found without
consulting LDAP.


thanks for your help
robert
___
Zope-PAS mailing list
Zope-PAS@zope.org
http://mail.zope.org/mailman/listinfo/zope-pas


Re: [Zope] Accessing Zope REQUEST data from a Python module

2007-12-06 Thread robert rottermann
hi ken,
very often you can replace context with self.
so instead of context.REQUEST you use self.REQUEST.
robert
Ken Winter schrieb:
 I'm customizing a product.  To do what I'm trying to do, I need to be able
 to access REQUEST data from within a Python module (not a script; a .py file
 containing class and method definitions).
 
From within a script, a line like
 
   req = context.REQUEST
 
 does the job just fine.  But when I put that line into my product module, I
 get a message like:
 
   Name context not defined
 
 and I don't see any way to import that into my module.
 
 At (http://www.plope.com/Books/2_7Edition/AppendixB.stx#0-8), the Zope API
 Reference describes the module HTTPRequest, which includes the class that
 it calls HTTPRequest(BaseRequest), which apparently is the equivalent of
 REQUEST as described above.  I have put this line into my module:
 
   from ZPublisher.HTTPRequest import HTTPRequest
 
 but now I don't know how to reference the request's contents.  I put in this
 line:
 
   req = HTTPRequest
 
 and print req to a debug file, and it shows:
 
   ZPublisher.HTTPRequest.HTTPRequest
 
 which I don't understand.  I have tried a half-dozen ways (suggested by the
 Zope API Reference) to get an actual property of the current HTTPRequest,
 but without success.  Examples:
 
   req['URL'] - TypeError: unsubscriptable object
   req.get('URL') - TypeError: unbound method get() must be called
 with HTTPRequest instance as first argument (got str instance
 instead)
   req.keys() - TypeError: unbound method keys() must be called with
 HTTPRequest instance as first argument (got nothing instead)
 
 The last two suggest that, while I have successfully imported the
 HTTPRequest *class*, I haven't successfully gotten the current HTTPRequest
 *instance*.  I don't know how to do that.
 
 So, I need an answer to any one of these questions:
 
 1. How can the Zope global name context be defined or imported into a
 non-script Python module?
 
 2. How can one get the current instance of the class HTTPRequest into a
 non-script Python module?
 
 3. If I'm looking in the wrong direction, what is the right way to make the
 current REQUEST's data available in a non-script Python module?
 
 ~ TIA
 ~ Ken 
 
 
 ___
 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 )
 

begin:vcard
fn:Robert  Rottermann
n: Rottermann;Robert
email;internet:[EMAIL PROTECTED]
tel;work:++41 31 333 10 20
tel;fax:++41 31 333 10 23
tel;home:++41 31 333 36 03
x-mozilla-html:FALSE
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 )


Re: [Zope] is it possible to bypass ZSQL methods and callstoredprocedures in sqlserver straight from ZPT?

2007-11-07 Thread robert rottermann

 You could also write a Product or External Method to access your
 databases directly, using something like:  http://pymssql.sourceforge.net/
 
you should not do that, you would get into lots of problems with zope's
transaction machinery.
always go trough a zope connection.

robert
begin:vcard
fn:Robert  Rottermann
n: Rottermann;Robert
email;internet:[EMAIL PROTECTED]
tel;work:++41 31 333 10 20
tel;fax:++41 31 333 10 23
tel;home:++41 31 333 36 03
x-mozilla-html:FALSE
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 )


Re: [Zope] Monkey patch tutorial

2007-11-04 Thread robert rottermann
Garito schrieb:
 Hi!
 I would like to know if there are some monkey patch tutorial or how-to
 anyone knows where?
 
 Thanks!
 
 -- 
 Mis Cosas
 http://blogs.sistes.net/Garito http://blogs.sistes.net/Garito
 
 
 
 
 ___
 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 )

http://wiki.zope.org/zope2/MonkeyPatch

hth
robert
begin:vcard
fn:Robert  Rottermann
n: Rottermann;Robert
email;internet:[EMAIL PROTECTED]
tel;work:++41 31 333 10 20
tel;fax:++41 31 333 10 23
tel;home:++41 31 333 36 03
x-mozilla-html:FALSE
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] ZopeProfiler:does its installation have a performance impact?

2007-09-21 Thread robert rottermann
Hi there,
does the installation of ZopeProfiler have a noticable performance
impact when it is disabled?

thanks
robert
begin:vcard
fn:Robert  Rottermann
n: Rottermann;Robert
email;internet:[EMAIL PROTECTED]
tel;work:++41 31 333 10 20
tel;fax:++41 31 333 10 23
tel;home:++41 31 333 36 03
x-mozilla-html:FALSE
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] VERY unusual zope traceback

2007-09-06 Thread robert rottermann
After my computer was iddling during the nigth I got the following
traceback. look at the rather genereous number of expected parameters.
how can somethings like this happen? Memory corruption?
restarting zope fixed it.

robert

Site Error

An error was encountered while publishing this resource.

exceptions.TypeError
Sorry, a site error occurred.

Traceback (innermost last):

* Module ZPublisher.Publish, line 196, in publish_module_standard
* Module Products.PlacelessTranslationService.PatchStringIO, line
34, in new_publish
* Module ZPublisher.Publish, line 146, in publish
* Module Zope2.App.startup, line 197, in zpublisher_exception_hook
* Module App.ZApplication, line 48, in __bobo_traverse__
* Module ZODB.DB, line 542, in open

TypeError: open() takes at least 1946389116 arguments (4 given)

in the console I see:
2007-09-07 05:33:03 ERROR PortalTransforms Cannot register transform
lynx_dump, using BrokenTransform: Error
 Unable to find binary lynx in
/home/robert/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/qt3/bin
2007-09-07 05:33:05 WARNING ZODB.DB DB.open() has 8 open connections
with a pool_size of 7
2007-09-07 05:33:06 WARNING ZODB.DB DB.open() has 9 open connections
with a pool_size of 7
2007-09-07 05:33:06 WARNING ZODB.DB DB.open() has 10 open connections
with a pool_size of 7
2007-09-07 05:33:11 WARNING ZODB.DB DB.open() has 11 open connections
with a pool_size of 7
2007-09-07 05:33:11 WARNING ZODB.DB DB.open() has 12 open connections
with a pool_size of 7
2007-09-07 05:33:11 WARNING ZODB.DB DB.open() has 13 open connections
with a pool_size of 7
2007-09-07 05:33:11 WARNING ZODB.DB DB.open() has 14 open connections
with a pool_size of 7
2007-09-07 05:33:11 CRITICAL ZODB.DB DB.open() has 15 open connections
with a pool_size of 7
2007-09-07 05:33:11 CRITICAL ZODB.DB DB.open() has 16 open connections
with a pool_size of 7
begin:vcard
fn:Robert  Rottermann
n: Rottermann;Robert
email;internet:[EMAIL PROTECTED]
tel;work:++41 31 333 10 20
tel;fax:++41 31 333 10 23
tel;home:++41 31 333 36 03
x-mozilla-html:FALSE
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 )


Re: [Zope] SOAPMethod

2007-09-03 Thread robert rottermann
Andreas Jung schrieb:
 
 
 --On 3. September 2007 16:10:56 +0200 robert rottermann
 [EMAIL PROTECTED] wrote:
 div tal:content=python:requestStudentData('5506239') /
 
 
 Likely you need tal:content=python: context.requestStudentData(...)
 
 -aj
andreas is perfectly right ..

rr
begin:vcard
fn:Robert  Rottermann
n: Rottermann;Robert
email;internet:[EMAIL PROTECTED]
tel;work:++41 31 333 10 20
tel;fax:++41 31 333 10 23
tel;home:++41 31 333 36 03
x-mozilla-html:FALSE
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 )


Re: [Zope] How do I eval a variable within the acquisition path?

2007-08-21 Thread robert rottermann
Tim Nash schrieb:
 I apologize for the question (the zope area of my brain must need
 coffee) but I can't find the answer in the zope book or in any of the
 scripts posted to the zope cookbook.
 
 I want to use a variable in a acquisition path.
 
 So for example, from the zope book on scripts, imagine that
 vaccinateplan() printed out a specific animals vaccination plan.
 
 Now instead of saying 'LargeAnimals' and 'hippo' like so:
 
 print context.Vet.LargeAnimals.hippo.vaccinateplan()
 
 I want to do like this:
 
 category = REQUEST.form['category']
 animal = REQUEST.form['animal']
 
 print context.Vet.category.animal.vaccinateplan()
print context.Vet[category]
or
print getattr(context.Vet, category, 'some default value')
hth
robert
begin:vcard
fn:Robert  Rottermann
n: Rottermann;Robert
email;internet:[EMAIL PROTECTED]
tel;work:++41 31 333 10 20
tel;fax:++41 31 333 10 23
tel;home:++41 31 333 36 03
x-mozilla-html:FALSE
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 )


Re: [Zope] asynchronous MailHost

2007-08-19 Thread robert rottermann
Andreas Jung schrieb:
 
 
 --On 19. August 2007 11:37:30 -0600 Sean Fulmer [EMAIL PROTECTED] wrote:
 
 I just read about the latest changes to MailHost:

 http://blog.zopyx.com/blog_ajung/archive/2007/08/19/zopes-mailhost-overha
 uled

 I'm currently using MaildropHost to do async delivery and would like
 to streamline that setup if possible.

 Can the latest MailHost be dropped into Zope 2.9.8?

 
 If you can get zope.sendmail running under Zope 3.2/Zope 2.9: yes.
 
 -aj
 if you achieve it I would be very much interested in a how-to
robert
begin:vcard
fn:Robert  Rottermann
n: Rottermann;Robert
email;internet:[EMAIL PROTECTED]
tel;work:++41 31 333 10 20
tel;fax:++41 31 333 10 23
tel;home:++41 31 333 36 03
x-mozilla-html:FALSE
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-PAS] easy way to list all ldap users from script??

2007-04-16 Thread robert rottermann
Hi there,
I have installed LDAPUserfolder 2.8beta and LDAPMultiPlugun for Plone 2.5.0
Is there an easy way to list all users from a script.
something like we have in the ZMI  user tab of the LDAPUserFolder?

thank you
robert
begin:vcard
fn:robert  rottermann
n:rottermann;robert 
email;internet:[EMAIL PROTECTED]
tel;work:031 333 10 20
tel;fax:031 333 10 23
tel;home:031 333 36 03
x-mozilla-html:FALSE
version:2.1
end:vcard

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


[Zope-PAS] using Session Auth Helper, sequence of active plugins

2007-04-10 Thread robert rottermann
Hi there,

I would like to use Session Auth Helper to authenticate a user after he
has logged into a site using Active Directory.

this are the steps I use to create the setup:
- add an ActiveDirectory Multiplugin
- activate all services
- apply patches to have the groups working
according instructions on Plone I install
LDAPMultiPlugins-plone.org.patch from antiloop.plone.org
- add an Session Auth Helper
- activate all three services (Reset Credentials, UpdateCredentials,
Extraction)
- Up the session timeout of the site to 5 hours

Now my questions:
- do I have to change the sequence of the active plugins to avoid
contacting the AD server after a successful login
  (as long the session is active)
it is like this now
credentials_cookie_auth
   AD Multiplugin
   Session Auth Helper
  
- is there something else I have to take care of?

thanks for your advice
robert

 
begin:vcard
fn:robert  rottermann
n:rottermann;robert 
email;internet:[EMAIL PROTECTED]
tel;work:031 333 10 20
tel;fax:031 333 10 23
tel;home:031 333 36 03
x-mozilla-html:FALSE
version:2.1
end:vcard

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


Re: [Zope-PAS] Re: using Session Auth Helper, sequence of active plugins

2007-04-10 Thread robert rottermann
Tres Seaver wrote:
 robert rottermann wrote:
  Hi there,
 
  I would like to use Session Auth Helper to authenticate a user after he
  has logged into a site using Active Directory.
 
  this are the steps I use to create the setup:
  - add an ActiveDirectory Multiplugin
  - activate all services
  - apply patches to have the groups working
  according instructions on Plone I install
  LDAPMultiPlugins-plone.org.patch from antiloop.plone.org
  - add an Session Auth Helper
  - activate all three services (Reset Credentials,
 UpdateCredentials,
  Extraction)
  - Up the session timeout of the site to 5 hours
 
  Now my questions:
  - do I have to change the sequence of the active plugins to avoid
  contacting the AD server after a successful login

(as long the session is active)
  it is like this now
  credentials_cookie_auth
 AD Multiplugin
 Session Auth Helper

  - is there something else I have to take care of?


 Yes, you want the session auth plugin to be registered *ahead* of the AD
 / LDAP plugin, in the registration for IAuthenticateCredentials.  That
 list looks like the one for IExtractCredentials (the cookie plugin can't
 actually authenticate, it only retrieves credentials from the request).


 Tres.
 --
thanks Tres,
a stupid follow up question: what is ahead?
(from the context of this mail) I assume this means above of AD?

robert
begin:vcard
fn:robert  rottermann
n:rottermann;robert 
email;internet:[EMAIL PROTECTED]
tel;work:031 333 10 20
tel;fax:031 333 10 23
tel;home:031 333 36 03
x-mozilla-html:FALSE
version:2.1
end:vcard

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


Re: [Zope] Problem with using versions.

2007-04-10 Thread robert rottermann
catherine,
what do you mean by version?
what zope and additional products are you using?

robert

Catherine E. Reinehr wrote:
 Hi,

 I've been working in a version for over a week and finally finished my
 changes today.  I saved them and quit the version, but the affected folder
 still has a lock on it.  I've tried four times now to save my changes, and
 it's just not working.  The first time, it seemed to publish the changes but
 the folder was still locked.  On later tries, I encounter an error when I
 try to access the page after saving changes.  Any suggestions?

 Thanks,
 Cathy

 -

 Catherine E. Reinehr
 Webmaster  Publications Designer
 Huntingdon College
 1500 E. Fairview Ave.
 Montgomery, AL 36106
 (334) 833-4429 / Flowers 103

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

   

begin:vcard
fn:robert  rottermann
n:rottermann;robert 
email;internet:[EMAIL PROTECTED]
tel;work:031 333 10 20
tel;fax:031 333 10 23
tel;home:031 333 36 03
x-mozilla-html:FALSE
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 )


Re: [Zope-PAS] what plugins are needed for authentication

2007-04-04 Thread robert rottermann
Mark Hammond wrote:
 Hi there,

 I want to write a PAS Plugin that does only the authentication.

 it should do the authentication and then store it in a
 session for a coupple of hours.

 Now I am unsure which services I have to implement.
 IAuthenticationPlugin ??
 IExtractionPlugin  ??
 

 Without more information, it's unclear what you will need.  Assuming you
 want to reuse either HTTP basic or cookie authentication for the mechanics
 of getting a username/password pair, you can enable the standard PAS plugins
 for IChallengePlugin and IExtractionPlugin.  You should then only need to
 implement IAuthenticationPlugin - and the main job there is for you to
 validate the credentials, then return a dict with the username you
 extracted.  You will also need to have a user manager - the ZODB User
 Manager might be OK.  I'd recommend the approach of setting PAS up with
 everything working as you want except for the actual authentication you want
 to perform.  You should then replace the interfaces from that set until
 everything you need is done :)

 This is mainly from memory, but I hope it helps...

 Mark

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

   
thank you very mutch to all the answer I got.
This is what I need:

 on an intranet I want to have all users in a plone user_source.
the authentication itself should be against a bunch of
ActiveDirectory-domains.
after the authemtication I just want the user to be authorized without
the need to re authenticate during business hours.

thanks  again
robert

begin:vcard
fn:robert  rottermann
n:rottermann;robert 
email;internet:[EMAIL PROTECTED]
tel;work:031 333 10 20
tel;fax:031 333 10 23
tel;home:031 333 36 03
x-mozilla-html:FALSE
version:2.1
end:vcard

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


Re: [Zope-PAS] what plugins are needed for authentication

2007-04-04 Thread robert rottermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Wichert Akkerman schrieb:
 Previously robert rottermann wrote:
 Mark Hammond wrote:
 Hi there,

 I want to write a PAS Plugin that does only the authentication.

 it should do the authentication and then store it in a
 session for a coupple of hours.

 Now I am unsure which services I have to implement.
 IAuthenticationPlugin ??
 IExtractionPlugin  ??
 
 Without more information, it's unclear what you will need.  Assuming you
 want to reuse either HTTP basic or cookie authentication for the mechanics
 of getting a username/password pair, you can enable the standard PAS plugins
 for IChallengePlugin and IExtractionPlugin.  You should then only need to
 implement IAuthenticationPlugin - and the main job there is for you to
 validate the credentials, then return a dict with the username you
 extracted.  You will also need to have a user manager - the ZODB User
 Manager might be OK.  I'd recommend the approach of setting PAS up with
 everything working as you want except for the actual authentication you want
 to perform.  You should then replace the interfaces from that set until
 everything you need is done :)

 This is mainly from memory, but I hope it helps...

 Mark

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

   
 thank you very mutch to all the answer I got.
 This is what I need:

  on an intranet I want to have all users in a plone user_source.
 the authentication itself should be against a bunch of
 ActiveDirectory-domains.
 after the authemtication I just want the user to be authorized without
 the need to re authenticate during business hours.
 
 Why do you want to have the users in source_users for that? That isn't
 necessary. Just do the normal AD authentication using LDAPMultiPlugins
 and use a session plugin such as SessionAuthHelper or plone.session.

with this approach we would loose the ability to
- - easily search for users
- - easily add users to ad hoc local groups.

I would be happy to hear that I am wrong tough ..

robert
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGE6IlGaryJ0T9kUYRAuaAAJwKwWO2IQ5lg6gfU6HzPPpORVog3gCcCsZo
3B1HGtBl9q3/1Vawhwwgf/g=
=2aHr
-END PGP SIGNATURE-
___
Zope-PAS mailing list
Zope-PAS@zope.org
http://mail.zope.org/mailman/listinfo/zope-pas


[Zope-PAS] what plugins are needed for authentication

2007-04-03 Thread robert rottermann
Hi there,

I want to write a PAS Plugin that does only the authentication.

it should do the authentication and then store it in a session for a coupple of 
hours.

Now I am unsure which services I have to implement.
IAuthenticationPlugin ??
IExtractionPlugin  ??


in the bygone world off monolithic acl_users  I had authenticate just returned  
True to authenticate the user.
and did noth bother about anything else..

thanks for your insight

robert
begin:vcard
fn:robert  rottermann
n:rottermann;robert 
email;internet:[EMAIL PROTECTED]
tel;work:031 333 10 20
tel;fax:031 333 10 23
tel;home:031 333 36 03
x-mozilla-html:FALSE
version:2.1
end:vcard

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


Re: [Zope] How can I reset zope time???

2007-03-23 Thread robert rottermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jens Vagelpohl schrieb:
 
 On 23 Mar 2007, at 07:41, Flemming Bjerke wrote:
 But, now, not only have all my changes the date 12/12-2007 in the
 undo history, every object I have changed gets this date as well!
 Apparently, zope won't accept to go backward in time.

 How do I reset the zope's time?

 Undo is transactional, meaning an undo is actually a new transaction
 instead of removing an old transaction. What you are trying to do is
 not possible, unless you physically truncate the database.
 
 I am not absolutely sure I understand you. I succeeded in undoing. My
 problem is that zope keeps on with the date 12/12-07. The zodb does
 not seem to accept a timestamp that is earlier than the last
 
 That's what I am trying to tell you. Any undo is actually a brand-new
 transaction that will by definition set the modification time to the
 current time. You *cannot* get back to the old modification time using
 Undo. This does not mean that Undo won't work at all, it will. But you
 will not get back your old modification time.
 
 jens
 

so it migth be enough, to export the folder(s) with your sites
remove the Data.fs to a secure place, restart zope and the reimport your
sites.

just an idea
robert
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGA4lfGaryJ0T9kUYRAoKMAJ97ooj+qxLZ5yA6kjk++w3iTj1xDgCfReFA
29pvh80BOjil2GPXxXurhdg=
=92Fr
-END 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] What is the best way to debug a Zope 2.62 application.

2007-03-19 Thread robert rottermann
Mark, Jonathan (Integic) wrote:
 I have a properly running instance of Zope 2.62 but no zopectl file.

 What is the best way to debug this version of Zope? Should I install zopectl?
   
 

 ___
 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 )
   
i believe zopectl was only introduced with 2.7.
there was a precursor to zopectl which still can be found somewhere in
the cvs.
however its layout was quiet a bit different to the one used with the
actual one.
so I doupt very much that this would be worth your efforts.

robert
begin:vcard
fn:robert  rottermann
n:rottermann;robert 
email;internet:[EMAIL PROTECTED]
tel;work:031 333 10 20
tel;fax:031 333 10 23
tel;home:031 333 36 03
x-mozilla-html:FALSE
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 )


Re: [Zope] form-script-zsql

2007-03-07 Thread robert rottermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

result = context.db_conn_id.db.query('YOUR QUERY HERE')
robert

javi lopez schrieb:
 I´m doing a form with username and email, these values go script
 python and with a zsql method inside script, it stored in DB
 I have a zpt with a form
 I have a script python::
 
 Connection DB::
 db_system_type = REQUEST.get('db_system_type', 'mysql')
 from Products.ZMySQLDA import DA
 DA.manage_addZMySQLConnection(self, db_conn_id, '',
 REQUEST.get('db_conn_str', '[EMAIL PROTECTED] zzz zzz'))
 
 #now i have to do zsql method to store the values in DB
 how can i do it??? Can you help me???Thanks
 
 When I fill in the form and i push send button, it store username
 and email in DB
 ___
 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 )
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFF7qxVGaryJ0T9kUYRAkSHAJ9DrgVCp5K79z1NAsQv6hZQtLZMHQCeP8i/
7ewGRmvUrDkvr0zBDI1tHas=
=Tlfx
-END 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] How to call a script by it's name stored in a variable.

2007-02-20 Thread robert rottermann
rieh25 wrote:
 How can I do something like this?
 
 var = '/Projects/test_py'
 
 return call_by_name(var)
 
 
 Thanks.
fun = context.restrictedTraverse(var)
return fun()

then there is path and getattr you should look at.

robert
begin:vcard
fn:robert  rottermann
n:rottermann;robert 
email;internet:[EMAIL PROTECTED]
tel;work:031 333 10 20
tel;fax:031 333 10 23
tel;home:031 333 36 03
x-mozilla-html:FALSE
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 )


Re: [Zope-DB] Please help me about driver adapter

2007-02-15 Thread robert rottermann
I do not think any one of us can help you unless you tell us what
exactly your problem with installing pymssql ist.
by the way: do you mean MySQLdb?

there is very good  documentation on using Z SQL in the zope book:
http://www.plope.com/Books/2_7Edition/RelationalDatabases.stx

there you find examples how to use a query with like.
robert

Nguyen Viet Minh Quang wrote:
 Dear Dieter and All,

 Thank you for your mail.

 I have now a trial version of mxODBC. However I don't really like it
 because it's not free. I would like to use pymssql and another one,
 although I try to install it more times but it's not working. Can you
 help me to install it?

 Moreover,  I'm testing my product with mxODBC. I have a problem about
 query. I want to use keyword 'LIKE' and '%' inside SQL query but I
 don't know how to do it. In the current, I use dtml-sqlvar and
 dtml-sqltest to do it. Do you know about my problem and can help me to
 solve it?

 Further, How can I format the text to get from database, about HTML tag?

 Thank you for your help.

 Best regards,
 

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

begin:vcard
fn:robert  rottermann
n:rottermann;robert 
email;internet:[EMAIL PROTECTED]
tel;work:031 333 10 20
tel;fax:031 333 10 23
tel;home:031 333 36 03
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


Re: [Zope-DB] Can I change the ZSQL max_rows default value?

2007-02-06 Thread robert rottermann
Robert-Reinder Nederhoed wrote:
 Good day,
 
 
 We use Zope 2.8, still from ZMI. We ran into the 1000 limit several
 times. Instead of remembering to set it to a higher value, I would like
 to change the ZSQL max_rows default to 5000.
 
 Is it possible to do this?
 
 
 Friendly greetings, Robert-Reinder
 
 -- 
 
 ___
 Zope-DB mailing list
 Zope-DB@zope.org
 http://mail.zope.org/mailman/listinfo/zope-db
 
in your zsql object there is aan advanced tab. there you can set the limit. 
if you set it to 0  all rows will be returned.
robert
begin:vcard
fn:robert  rottermann
n:rottermann;robert 
email;internet:[EMAIL PROTECTED]
tel;work:031 333 10 20
tel;fax:031 333 10 23
tel;home:031 333 36 03
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


Re: [Zope-DB]found reason: sql query works in database connector but not in ZSQL method

2007-01-18 Thread robert rottermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

hi there,

I think I found the reason, for my problems with stored procedures.
it seems that on can not call a stored MySQL 5.0x procedure from zope
that returns a data set.
when I call the body of the stored procedure everything works fine.

what I now do as an interim solution, I call the read only procedures
directly from python.
procedures that alter data i call from a zope connector.

I would be glad to here of any reason not to do this.

thanks for your help.

robert
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFr6c9GaryJ0T9kUYRAlkiAJ9TZ3rKw3iiTHuZ1fiQuJE6Sdoa0wCfZr63
uNOpVr8pc+rYV6jwbZ9l6sI=
=p3jD
-END PGP SIGNATURE-
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


[Zope-DB] sql query works in database connector but not in ZSQL method

2007-01-17 Thread robert rottermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi there,

I try the following statement:
CALL selectVertexProperties(1, @error2)

when I execute this directly in the test window of the database
connection, it works fine.
when i execute the same line in the test window of a ZSQL Method
then I get an error:

Error, Products.mxODBCZopeDA.ZopeDA.ReplayTransaction: OperationalError
on : ('HYT00', 2014, [unixODBC][MySQL][ODBC 3.51
Driver][mysqld-5.0.26]Commands out of sync; you can't run this command
now, 6113) SQL used:

CALL selectVertexProperties(1, @error2)

when I call this method from plain python, it works fine also.

Any pointers what could be the reason would be greatly appreciated.

robert
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFrjW8GaryJ0T9kUYRAj3iAJ0ccFcfy/y3q4eQs+80ZfDhQFuyfwCePLG+
wjLmLUZmHOvnkEkygo82HJA=
=Jq1+
-END PGP SIGNATURE-
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] sql query works in database connector but not in ZSQL method

2007-01-17 Thread robert rottermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Charlie Clark schrieb:
 Am 17.01.2007, 15:42 Uhr, schrieb robert rottermann [EMAIL PROTECTED]:
 
 Hi there,
 I try the following statement:
 CALL selectVertexProperties(1, @error2)
 when I execute this directly in the test window of the database
 connection, it works fine.
 when i execute the same line in the test window of a ZSQL Method
 then I get an error:
 Error, Products.mxODBCZopeDA.ZopeDA.ReplayTransaction: OperationalError
 on : ('HYT00', 2014, [unixODBC][MySQL][ODBC 3.51
 Driver][mysqld-5.0.26]Commands out of sync; you can't run this command
 now, 6113) SQL used:
 
 Robert,
 
 you might have to call this using the callproc() method of the DA in an
 ExternalMethod.
 
 Charlie
 

If tried that, but somehow I did not get it rigth:
questions:
- - the first parameter is an integer, how do I force that?
- - the second parameter is an out parameter, how do I specify that ?

thanks
robert

('23000', 1064, [unixODBC][MySQL][ODBC 3.51 Driver][mysqld-5.0.26]You
have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near '{call
selectVertexProperties('1')}' at line 1, 6088)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFrktyGaryJ0T9kUYRAv7xAJ9fTQ819q6dpQELO4Y3Ix/LB7ARjgCfTmRx
tA3og1VuWZnRmDqpcjhUqdY=
=S1mn
-END PGP SIGNATURE-
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] sql query works in database connector but not in ZSQL method

2007-01-17 Thread robert rottermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kevin Campbell schrieb:
 On Wed, Jan 17, 2007 at 03:42:04PM +0100, robert rottermann wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi there,

 I try the following statement:
 CALL selectVertexProperties(1, @error2)

 when I execute this directly in the test window of the database
 connection, it works fine.
 when i execute the same line in the test window of a ZSQL Method
 then I get an error:

 Error, Products.mxODBCZopeDA.ZopeDA.ReplayTransaction: OperationalError
 on : ('HYT00', 2014, [unixODBC][MySQL][ODBC 3.51
 Driver][mysqld-5.0.26]Commands out of sync; you can't run this command
 now, 6113) SQL used:

 CALL selectVertexProperties(1, @error2)

 when I call this method from plain python, it works fine also.

 Any pointers what could be the reason would be greatly appreciated.
 
 Robert,
 
 Can you give an example of how you call this in plain python? It may be
 that in using plain python you are starting a new transaction, and there
 are previous sql commands which are causing problems. Perhaps some more
 details of the sql statements issued would be helpful also.
 
 Kevin
 
thanks for your answer,
 here is what I do in a plain python script (using MySQLdb):

def findUser(username):
query = CALL selectVertexIdFromLogin('%s', @id, @error1); \
CALL selectVertexProperties(@id, @error2) % username
cursor.execute(query)
cursor.nextset()
print cursor.fetchall()

this is what I try to do in a method in a Zope product of ours:
def getUserDataById(self, userid=''):
return base user data for user. if userid is not given use
looged in user
db = self.redscout_tool.scout_connection()
sql_delimiter = self.sql_delimiter
if not userid:
userid = self.portal_membership.getAuthenticatedMember().getId()
query = CALL selectVertexIdFromLogin('%s', @id, @error); select
@error, @id % userid
result = db.query((query).replace(';', sql_delimiter))
if result:
result = result[1][0]
error = int(result[0])
if error:
handle error
return 'fehler'
else:
dbid = int(result[1])
query =  CALL selectVertexProperties(%s, @error2) % dbid
- - result = db.query((query).replace(';', sql_delimiter))
return result


thanks for your help
robert
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFrkw9GaryJ0T9kUYRArRdAJ9KR+vSS8oF8zIdmkSXEdBJ3d4p9wCfaVtb
e1vDt07FPzJMYh0T4PqgEl4=
=NbWY
-END PGP SIGNATURE-
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


  1   2   3   >