Re: [Zope] Frustrated with Python and Frameworks. Zope, Grok, , Django, CherryPy

2007-11-27 Thread Martijn Jacobs


Hi Martijn and others.

I don't see anything I like better, but have a nagging worry that  
Zope, and especially Zope 2, may become increasingly neglected as  
time goes by.


I have to say +1 on this one. We still use Zope 2 for most of our
projects, as the software is stable, mature and if you know how it
works you can do anyhting with it, and you can do it very fast.

I'm very pleased that some older products (including our own)
from 5 or 6 year ago still work in the latest zope version,
sometimes with some minor adjustments. But the core of Zope 2
has changed a lot, while still being compatible as much as
possible.

I think the Zope 2 developers and release manager(s) deserve
a lot of credits and respect for that.

But it's since Five that there is some active development
happening on this platform. (And offcourse not to forget the need
for Plone to have zope3 technologies available).
Cleanup and some refactoring has been done, and some Products are
now part of the core. You an find most of the documentation in
interfaces files right now which is a good thing offcourse, and
you can use zope3 technologies if you like, a much cleaner
way of development then old skool Zope 2 products.

I don't think the problem is activity on the Zope 2 front itself,
but the community website zope.org which should convey this message
of a mature Zope 2 platform with the availability of new
technologies. But now it's a dead, outdated website which I think
is sad because it's not reflecting what is actually happening.



This sounds like something that could be potentially interesting
for new new zope.org, which is currently in development


So that's why I mention this quote : Martijn, I'm very curious
about the status, plan or purpose of the new zope.org?

I think if the new site gets rid of all the outdated stuff,
learn from the plone.org website (or even use it as a boiler
plate, they really did a great job I think), include some nice
documentation based on tutorials like
http://slinkp.com/~paul/pycon_2006/z2/notes.html and
http://plone.org/documentation/tutorial/five-zope3-walkthrough,
for example (Phillip has some nice tutorials as well)
it would feel so much better for all the Zope 2 developers who
are still out there, and for the new developers who want to use
it, but now have the feeling that Zope 2 is a dead end.




--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL
e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117



___
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] Frustrated with Python and Frameworks. Zope, Grok, , Django, CherryPy

2007-11-27 Thread Martijn Jacobs



We could also consider putting them in some kind
 of collective-like SVN repository so that people can
make changes when they need to.


I think this is a great idea as it works with the Plone collective this 
way as well.



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL
e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117



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

2007-11-28 Thread Martijn Jacobs
Can you provide some more information? Which version of zope, python, 
ZMySQLDA and mysql?

Hi,
 
Please i need help on this.
 
Thx
 
 
Site Error

An error was encountered while publishing this resource.
 
thread.error
 
Sorry, a site error occurred.
 
Traceback (innermost last):
 
Module ZPublisher.Publish, line 202, in publish_module_standard

Module ZPublisher.Publish, line 161, in publish
Module Zope2.App.startup, line 241, in abort
Module transaction._manager, line 107, in abort
Module transaction._transaction, line 569, in abort
Module transaction._transaction, line 642, in abort
Module Shared.DC.ZRDB.TM, line 64, in abort
Module Products.ZMySQLDA.db, line 389, in _abort
error: release unlocked lock
 
 
 
Error Type: AssertionError
Error Value: newInteraction called while another interaction is 
active: File 
D:\DailyMirror\zope\Zope\lib\python\ZServer\PubCore\ZServerPublisher.py, 
line 25, in __init__ response=b) File 
D:\DailyMirror\zope\Zope\lib\python\ZPublisher\Publish.py, line 401, 
in publish_module environ, debug, request, response) File 
D:\DailyMirror\zope\Zope\lib\python\ZPublisher\Publish.py, line 202, 
in publish_module_standard response = publish(request, module_name, 
after_list, debug=debug) File 
D:\DailyMirror\zope\Zope\lib\python\ZPublisher\Publish.py, line 79, 
in publish newInteraction() File 
D:\DailyMirror\zope\Zope\lib\python\zope\security\management.py, 
line 91, in newInteraction interaction._newInteraction_called_from = 
traceback.extract_stack()
 

 



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



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

___
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] Frustrated with Python and Frameworks. Zope, Grok, , Django, CherryPy

2007-11-28 Thread Martijn Jacobs

Hi Martijn.
Just to make it utterly clear: this stuff won't happen by itself. 
I understand. It's good to hear that zope 2 is in good hands, at least 
for working on the code. If a new zope.org is in development I can 
volunteer to make some tutorials or even documentation. Will get back on 
this one later.



Martijn.



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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] You are not allowed to access 'a particular str' in this context

2008-01-24 Thread Martijn Jacobs
Does this problem only occure with message/ID ? Or also with 
message/Message or message/SenderId ?


Which version of zope are you using?


Kind regards,


Martijn.

Hi all,

I have a rather strange Problem.

I have a PersistentList containing PersistentMapping objects.

[{'Status': 'Read', 'Confirm': False, 'Read': DateTime('2008/01/24
16:03:32.508 GMT+1'), 'Expires': None, 'SenderID': 'DC83D1F1DB88CDE8', 'Date':
DateTime('2008/01/24 15:51:50.998 GMT+1'), 'Message': 'Da ist ein permission
test', 'ID': '[EMAIL PROTECTED]'}]

When do a tal:repeat=message here/getMessages and a tal:replace=message
everything functions as expected. When i try tal:replace=message/ID I get an
 Unauthorized Exception You are not allowed to access 'a particular str' in
this context

I can access all DateTime objects. Only the strings a not allowed.

There is no difference when getMessages return of the Original list and when I
 build a new list with copies of the PersistentMapping objects.

To get this working I have to create new Dictionary from the Persistent
Mappings add them to an normal List and return this list.

ret = []

for test in self.msglist :
temptest = {}
for (key,value) in test.items() :
temptest[key] = value
ret.append(temptest)
return ret

That's a real performance killer as the list is read quite frequently.

Any Idea how to fix this.


Gerhard
  



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



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

___
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] Managing Zope objects in Subversion

2008-03-02 Thread Martijn Jacobs

Hi Martin.

Maybe http://dirstorage.sourceforge.net/index.html is something for you.


Martijn.


[EMAIL PROTECTED] wrote at 2008-3-2 14:17 +0100:
  
We use Zope for the  user interface part of our software product. 
We currently export the whole folder hierarchy into a .zexp file and
maintain this file in Subversion. 

I'm looking for a way to manage a folder structure as individual 
Zope objects in Subversion. 



When I remember right, Tres has a product that allows to
dump and restore standard Zope objects to/from the file system.
I forgot its name but you should be able to find it via
your favorite search engine.
  


--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

___
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] Question about dot in method name

2008-03-25 Thread Martijn Jacobs


Maybe a simple solution  :

Do you use apache as a frontend for your zope? If you do you can rewrite 
the incoming url's for example like this :


RewriteEngine On
RewriteRule ^/folder/mydoc.xls(.*) 
http://localhost:8080/VirtualHostBase/http/myIntranet/object_in_zope/VirtualHostRoot/mydoc_xls$1 
[L,P]





hi every body i'm changing a very old zclass product.
In this zclass i declare a python script with this name mydoc.xls
this script return an xls file with an argument

now i'm writing a zope2 product. How can I explain to zope
that he should publish a certain method with a different name
so when people type 
http://myIntranet/folder/mydoc.xls?fileName=hello.xls it point
to a real python method (dot caracter are forbiden in python class 
method)


mydoc.xls = mydoc_xls(REQUEST=None)

I know that Zclasses are bad :) , but I cannot change this URL, because
lot's of people record it.

thank's a lot for an advice.

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



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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: Question about dot in method name

2008-03-26 Thread Martijn Jacobs


If you have a zope product you can do something like this indeed :

class MyContainer(Folder):
  My Folderish Product

  def mydoc_xls(self, REQUEST=None):
 My new xls method
 return My new xls method

  def __getitem__(self, key):
 Check for mydoc.xls, then return mydoc_xls
 if key == 'mydoc.xls':
  return self.mydoc_xls
 return super(Folder, self).__getitem__(key)




Hi!
Hey, Tres, could you point us to a web example or a web page with more 
information about that technique?
I'm very interested on it and the technique that was introduced 
sometime ago about how to return a string as __bobo_traverse__ 
response but the example was uncompleted (for me at least)


This kind of information was very useful for many of us but there are 
no good tutorial or how-to


Thanks a lot!

2008/3/26, Tres Seaver [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Martijn Jacobs wrote:
 Maybe a simple solution  :

 Do you use apache as a frontend for your zope? If you do you can
rewrite
 the incoming url's for example like this :

 RewriteEngine On
 RewriteRule ^/folder/mydoc.xls(.*)


http://localhost:8080/VirtualHostBase/http/myIntranet/object_in_zope/VirtualHostRoot/mydoc_xls$1
 [L,P]


Or add a '__getitem__' to your class that looks for that key and
returns
the right method.


Tres.
- --
===
Tres Seaver  +1
540-429-0999  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH6ZfK+gerLs4ltQ4RAgdjAJ9bwmIjAbqkG1YKUyrgbKSG47FlXgCdHW+P
GzL6mjcA1K8t9Q/5Y75tfF4=
=mySN
-END PGP SIGNATURE-


___
Zope maillist  -  Zope@zope.org mailto: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 )




--
Mis Cosas
http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670


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



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

___
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: Question about dot in method name

2008-03-26 Thread Martijn Jacobs

Hi Stéphane.

Check out 
http://www.zope.org/Documentation/Books/ZDG/current/ObjectPublishing.stx


See the heading Traversal methods where this is explained.



Martijn.

Great, I should test this code tonight !
some more question : id don't understand the two different usage  of 
__getitem__

and __bobo_traverse__. __bobo_traverse__ seems to be a way to control
url walk and __getitem__ control the way attributs can be load by zope.

If I change the URL when I use __bobo_traverse__ it works, and if I 
change the way

I'm searching attributs in zope object tree it works too. Is it correct ?


2008/3/26, Martijn Jacobs [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]:



If you have a zope product you can do something like this indeed :

class MyContainer(Folder):
   My Folderish Product

   def mydoc_xls(self, REQUEST=None):
  My new xls method
  return My new xls method

   def __getitem__(self, key):
  Check for mydoc.xls, then return mydoc_xls
  if key == 'mydoc.xls':
   return self.mydoc_xls
  return super(Folder, self).__getitem__(key)




Hi!
Hey, Tres, could you point us to a web example or a web page with
more information about that technique?
I'm very interested on it and the technique that was introduced
sometime ago about how to return a string as __bobo_traverse__
response but the example was uncompleted (for me at least)

This kind of information was very useful for many of us but there
are no good tutorial or how-to

Thanks a lot!

2008/3/26, Tres Seaver [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Martijn Jacobs wrote:
 Maybe a simple solution  :

 Do you use apache as a frontend for your zope? If you do you
can rewrite
 the incoming url's for example like this :

 RewriteEngine On
 RewriteRule ^/folder/mydoc.xls(.*)
 
http://localhost:8080/VirtualHostBase/http/myIntranet/object_in_zope/VirtualHostRoot/mydoc_xls$1
 [L,P]


Or add a '__getitem__' to your class that looks for that key
and returns
the right method.


Tres.
- --
===
Tres Seaver  +1
540-429-0999  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
Palladion Software   Excellence by
Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH6ZfK+gerLs4ltQ4RAgdjAJ9bwmIjAbqkG1YKUyrgbKSG47FlXgCdHW+P
GzL6mjcA1K8t9Q/5Y75tfF4=
=mySN
-END PGP SIGNATURE-


___
Zope maillist  -  Zope@zope.org mailto: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 )




-- 
Mis Cosas

http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670


___
Zope maillist  -  Zope@zope.org mailto: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 )

  



-- 
Martijn Jacobs

Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] | web: 
http://www.fourdigits.nl

tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 



___
Zope maillist  -  Zope@zope.org mailto: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 )





--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

___
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: Question about dot in method name

2008-03-27 Thread Martijn Jacobs

Hmm, that's strange.

Maybe if you call the __getitem__ function itself? :

return Folder.__getitem__(self, key)

It should be working though


__getitem__ raise an exception :
*Error Type: AttributeError*
*Error Value: 'super' object has no attribute '__getitem__'

my class derive from
   (ObjectManager, BTreeFolder2, PropertyManager):
I test :
**(ObjectManager, Folder PropertyManager):*
**and got the same exception

the method of Sascha is working (This is a satisfaction). but i'm
very interesting to understand the method proposed by Martijn.


Martijn Jacobs a écrit :

Hi Stéphane.

Check out 
http://www.zope.org/Documentation/Books/ZDG/current/ObjectPublishing.stx


See the heading Traversal methods where this is explained.



Martijn.

Great, I should test this code tonight !
some more question : id don't understand the two different usage  of 
__getitem__

and __bobo_traverse__. __bobo_traverse__ seems to be a way to control
url walk and __getitem__ control the way attributs can be load by zope.

If I change the URL when I use __bobo_traverse__ it works, and if I 
change the way
I'm searching attributs in zope object tree it works too. Is it 
correct ?



2008/3/26, Martijn Jacobs [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]:



If you have a zope product you can do something like this indeed :

class MyContainer(Folder):
   My Folderish Product

   def mydoc_xls(self, REQUEST=None):
  My new xls method
  return My new xls method

   def __getitem__(self, key):
  Check for mydoc.xls, then return mydoc_xls
  if key == 'mydoc.xls':
   return self.mydoc_xls
  return super(Folder, self).__getitem__(key)




Hi!
Hey, Tres, could you point us to a web example or a web page
with more information about that technique?
I'm very interested on it and the technique that was introduced
sometime ago about how to return a string as __bobo_traverse__
response but the example was uncompleted (for me at least)

This kind of information was very useful for many of us but
there are no good tutorial or how-to

Thanks a lot!

2008/3/26, Tres Seaver [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Martijn Jacobs wrote:
 Maybe a simple solution  :

 Do you use apache as a frontend for your zope? If you do
you can rewrite
 the incoming url's for example like this :

 RewriteEngine On
 RewriteRule ^/folder/mydoc.xls(.*)
 
http://localhost:8080/VirtualHostBase/http/myIntranet/object_in_zope/VirtualHostRoot/mydoc_xls$1 


 [L,P]


Or add a '__getitem__' to your class that looks for that key
and returns
the right method.


Tres.
- --

===

Tres Seaver  +1
540-429-0999  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
Palladion Software   Excellence by
Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD8DBQFH6ZfK+gerLs4ltQ4RAgdjAJ9bwmIjAbqkG1YKUyrgbKSG47FlXgCdHW+P

GzL6mjcA1K8t9Q/5Y75tfF4=
=mySN
-END PGP SIGNATURE-


___
Zope maillist  -  Zope@zope.org mailto: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 )




-- Mis Cosas
http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670

 



___
Zope maillist  -  Zope@zope.org mailto: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 )

  



-- Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL kvk: 09162137 | 
btw: 8161.22.234.B01
e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] | 
web: http://www.fourdigits.nl


tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117

___
Zope maillist  -  Zope@zope.org mailto: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] worldcookery.com five tutorial ploneconf05 - AttributeError: DateTime instance has no __call__ method...

2008-04-01 Thread Martijn Jacobs

What if you change :

  updated 
tal:content=python:obj.modified().HTML4()2000-01-01T12:00+00:00/updated

to :

  updated 
tal:content=python:obj.modified.HTML4()2000-01-01T12:00+00:00/updated

?

(just a guess, because it says that obj.modified already is a DateTime 
instance)

Hi

Been following this turorial at:

http://worldcookery.com/files/ploneconf05-five/index.html

Using Plone 3.0.6. and Zope 2.10.5 and trying to view
http://localhost:8080/portal/news/atom.xml

leads me to the below error. Plone 3 thing?

  Module zope.tales.tales, line 696, in evaluate
   - URL: index
   - Line 22, Column 3
   - Expression: PythonExpr (obj.modified().HTML4())
   - Names:
  {'container': ATBTreeFolder at /portal/news,
   'context': ATBTreeFolder at /portal/news,
   'default': object object at 0x008BB528,
   'here': ATBTreeFolder at /portal/news,
   'loop': {u'obj':
Products.PageTemplates.Expressions.PathIterator object at
0x082FFB10},
   'nothing': None,
   'options': {'args': (Products.Five.metaclass.SimpleViewClass
from C:\Enfold\Products\FiveFeeds\atom.pt object at 0x082FFD50,)},
   'repeat': Products.PageTemplates.Expressions.SafeMapping
object at 0x0864EE68,
   'request': HTTPRequest, URL=http://localhost:8080/portal/news/atom.xml,
   'root': Application at ,
   'template': ImplicitAcquirerWrapper object at 0x082FFDD0,
   'traverse_subpath': [],
   'user': PropertiedUser 'michael',
   'view': Products.Five.metaclass.SimpleViewClass from
C:\Enfold\Products\FiveFeeds\atom.pt object at 0x082FFD50,
   'views': zope.app.pagetemplate.viewpagetemplatefile.ViewMapper
object at 0x082FF990}
  Module zope.tales.pythonexpr, line 59, in __call__
   - __traceback_info__: (obj.modified().HTML4())
  Module string, line 0, in ?
AttributeError: DateTime instance has no __call__ method

  



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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] ExternalMethod - add new parameter

2008-04-07 Thread Martijn Jacobs

rishi pathak wrote:

There is a requirement for running some external methods as super user.
For this I thought of adding a new parameter.If set the code would be 
executed with effective uid of root.
Can some one point to the code section where zope loads the 
ExternalMethod codes for execution.
External methods are not executed as shell scripts as you might think. 
They are called by the zope process and therefore running as the 
'effective-user' which is configured in etc/zope.conf. Security wise 
it's also not recommended to do so anyway.


I'd suggest you create a cron job for the root user which does the 
things you want (you could do that in python as well).




Martijn.

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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 under vmware is too slow

2008-04-07 Thread Martijn Jacobs

Jaroslav Lukesh wrote:

Dear all,
 
I must install zope under vmware, but there are big speed degradation 
over plain machine. Does somebody have some tiptricks to run Zope 
under VMware faster?
 
Many thanks, J. Lukesh
It's probably not zope that is slow but disk access. Does it have enough 
RAM memory, is it swapping to disk often, etc?



Martijn.

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

___
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] default-zpublisher-encoding and zpt encoding

2008-04-08 Thread Martijn Jacobs

Hi Yuri.
Strange, but using a different apache it has worked as expected, the 
encoding is sent now, FYI :)


Just out of curiosity : which version of apache did you have and which 
do you use now?



Martijn.

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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] ExternalMethod - add new parameter

2008-04-08 Thread Martijn Jacobs

Hi Rishi.
Can you telll me where should I look in the source(Code segment where 
external methods are loaded and executed)
External methods are not just 'called' or 'loaded', they are executed in 
a zope thread which belong to the zope user. Changing the effective user 
would be a complex and risky task to do and is probably not needed your 
your project.


Can you explain what you're trying to do in those External methods? 
Maybe we can help you to find a more elegant, simple solution.



Martijn.

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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] Upgrade to 2.7.2 results in all content unavailable

2008-04-11 Thread Martijn Jacobs
And do you see any errors when starting zope with zopectl fg ? (or do 
you see any errors in the log/event.log file?)





- Original Message - From: Wes Modes [EMAIL PROTECTED]
To: zope@zope.org
Sent: Friday, April 11, 2008 12:04 AM
Subject: [Zope] Upgrade to 2.7.2 results in all content unavailable


I upgraded to Zope 2.7.2 and all of my content can't be seen by 
Zope.  Honestly I'm not sure what the previous version I was running 
was (nor am I sure how to find out).


Now, every page results in

Site Error
An error was encountered while publishing this resource.
Resource not found
Sorry, the requested resource does not exist.
Check the URL and try again.
Resource: Zope GET


What version of zope did you upgrade from?
What happens when you try to access any of the problem objects via the 
ZMI?



Jonathan

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



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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] Data.fs Recovery

2008-04-15 Thread Martijn Jacobs
What is the file size of the Data.fs file? Did you try stopping zope, 
removing the Data.fs.index file and starting it again?




Apologies if this is not the right forum

I have a corrupt Data.fs file and would appreciate some help recovering
data.

Zope 2.4 (still in the Stone Age)
OS: Windows 2003 server
Runs as service

The problem was first noticed yesterday on trying to save a web page
after making changes. Received the following error message.
IOError: (0, 'Error')

I tried the following

Restating the Zope service with the following results
- Starts and stops immediately

Start the Zope service using start.bat get the following

D:\civilstart.bat
--
2008-04-14T23:20:34 PROBLEM(100) Init Ambiguous name for method of
Products.Pyth
onMethod.PythonMethod.PythonMethod: manage != manage_main
--
2008-04-14T23:20:35 PROBLEM(100) Init Ambiguous name for method of
Products.ZDat
aQueryKit.ZVisualODBCClient.ZVisualODBCClient: manage_propertiesForm
!= manag
e_main
--
2008-04-14T23:20:35 PROBLEM(100) Init Ambiguous name for method of
Products.ZDat
aQueryKit.ZVisualODBCClient.ZVisualODBCClient: manage_propertiesForm
!= manag
e_main
--
2008-04-14T23:20:35 PANIC(300) z2 Startup exception
Traceback (innermost last):
 File D:\civil\z2.py, line 564, in ?
 File string, line 1, in ?
 File D:\civil\lib\python\Zope\__init__.py, line 110, in ?
 File D:\civil\lib\python\ZODB\FileStorage.py, line 311, in __init__
   (Object: D:\civil\var\Data.fs)
 File D:\civil\lib\python\ZODB\FileStorage.py, line 1747, in read_index
IOError: (0, 'Error')

Running tranalyzer.py and at some stage I get the following

31166 91405999210488
Traceback (most recent call last):
 File lib/python/ZODB/tranalyzer.py, line 333, in ?
   main(sys.argv)
 File lib/python/ZODB/tranalyzer.py, line 325, in main
   t = Transaction(f, off, refs)
 File lib/python/ZODB/tranalyzer.py, line 170, in __init__
   self.obs.append(Record(f, refs))
 File lib/python/ZODB/tranalyzer.py, line 214, in __init__
   data = f.c(dl - 8)
 File lib/python/ZODB/tranalyzer.py, line 105, in c
   self.checkleft(n)
 File lib/python/ZODB/tranalyzer.py, line 87, in checkleft
   raise 'Not enough data left, %d  %d' % (self.left, n)
Not enough data left, 31166  91405999210488

Running fsrecover.py get the following

D:\civilbin\python lib/python/ZODB/fsrecover.py var/Data.fs
Traceback (most recent call last):
 File lib/python/ZODB/fsrecover.py, line 94, in ?
   FileStorage.recover(sys.argv[1])
 File D:\civil\lib\python\ZODB\FileStorage.py, line 1721, in recover
   pos, oid, tid = read_index(
 File D:\civil\lib\python\ZODB\FileStorage.py, line 1747, in read_index
   file_size=file.tell()
IOError: (0, 'Error')

D:\civilbin\python lib/python/ZODB/fsrecover.py
Traceback (most recent call last):
 File lib/python/ZODB/fsrecover.py, line 94, in ?
   FileStorage.recover(sys.argv[1])
IndexError: list index out of range


Please help!!

Thanks
Godwin

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



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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] Data.fs Recovery

2008-04-15 Thread Martijn Jacobs

Godwin Vaz wrote:

Martin,

The file size is 2GB. Could that be the problem?

Older versions of python (and the one used with zope2.4 is VERY old, 
probably 2.1) have indeed a filesize limit of 2 Gb so here is your problem.


Well, It was about time to migrate to a newer version anyway :) The ldap 
module you mention is probably a python module, so try if you can have 
this one working (or google for another version for python 2.4 on 
windows) http://www.agescibs.org/mauro/



Good luck.

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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: authentication with python program

2008-04-18 Thread Martijn Jacobs

Hi Miguel,

Is the dtml page accessable by the role myuser has?  Did you set the 
Use Database Methods permission for that role?






Hi Miguel

First, you could drop the Unauthorized Exception from the error_log
object in the root folder of the zope management interface. Then
activate the verbose-security option in your zope.conf file. To do
this, you need to put/replace this lines:

security-policy-implementation python
verbose-security on

After you have done this, you need to restart zope, try again your
authentication script, and take a look at your event.log file or
the error_log object. You may find the reason of why is this failing.
In case you don't find it, then place the full traceback here.

Best regards
Josef

Miguel Beltran R. schrieb:

I have this program what open a dtml what return a XML page, but I
have error with permisions:

import urllib, urllib2

pagina = http://10.28.1.239/bitacoras/alta/estado2.html;
datos = {btipo:D,
 bholo:87654321,
 bplac:dd-12345,
 accion:alta_gasolina,
}

params=urllib.urlencode(datos)
aut=urllib2.HTTPBasicAuthHandler()
aut.add_password(AFICON, pagina, myuser, mypass)
opener=urllib2.build_opener(aut)
urllib2.install_opener(opener)
r=urllib2.urlopen(pagina,params)
print r.read()
r.close()

but returned XML say:
ajax
  accionalta_gasolina/accion
   respuestaerror/respuesta
error_typeUnauthorized/error_type
error_descriptionYou are not allowed to access 'zsql_alta'
in this context/error_description

  /ajax

help? how I can send HTTPBasicAuth?

pd. Sorry by my bad english


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



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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: authentication with python program

2008-04-18 Thread Martijn Jacobs

Miguel Beltran R. wrote:

#Martijn
Yes, have role manager


  
What if you login with the user with your webbrowser instead of your 
python program?



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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: authentication with python program

2008-04-18 Thread Martijn Jacobs
I have a very old python script which does want you want, I can send it 
to you if you like.



Martijn

Using web browser work fine.

Using wireshark I see what my python program not send WWW-Authentification.

Now I going to python list. But if someone know how can tell me please

2008/4/18, Martijn Jacobs [EMAIL PROTECTED]:
  

Miguel Beltran R. wrote:



#Martijn
Yes, have role manager




  

 What if you login with the user with your webbrowser instead of your python
program?


 --
 Martijn Jacobs
 Four Digits, Internet Solutions

 a: Willemsplein 15-1 6811 KB Arnhem NL kvk: 09162137 | btw:
8161.22.234.B01
 e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
 tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117





  



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

___
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: authentication with python program

2008-04-18 Thread Martijn Jacobs

Miguel Beltran R. wrote:

Yes please
and thakns to every body
  

Here you go  :

#!/bin/python

import base64
import urllib2
base64string = base64.encodestring('%s:%s' % (username, password))
url = http://10.28.1.239/bitacoras/alta/estado2.html;
req = urllib2.Request(url)
req.add_header(Authorization, Basic %s % base64string)
handle = urllib2.urlopen(req)
print handle.read()




--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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] Question about adapters

2008-05-09 Thread Martijn Jacobs


Hello guys.

A question about adapters : I've written two adapters wich implement my 
own interface IMyAdapter. The first adapter adapts 
CMFCore.interfaces._content.IFolderish objects and the other one 
CMFCore.interfaces._content.IContentish objects.


One of the base classes of the IFolderish objects also implement the 
IContentish interface, so when I adapt folderish objects with 
IMyAdapter(object), the adapter registered for the IContentish objects 
always wins. (and if it's a folderish object I want the adapter for 
IFolderish to jump in).


In other words : How can I influence the order of adapter lookup?

I'm feeling there should be a simple solution for this (applying a 
marker interface to folderish objects?), so I hope someone can point me 
in the right direction.



Kind regards,



Martijn.

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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] acl_users folder 25000

2008-06-03 Thread Martijn Jacobs

Kees de Brabander wrote:
A client of mine wants a site that is only accessible for members. 
However, there are more than 25000 members. Are there any reasons that 
would make it unwise to populate an ordinary acl_users folder with 
such a number of user accounts?

If so, what other options do I have?
If it's possible to use a existing userdatabase or authentication source 
I would prefer to use that. With 
http://www.zope.org/Products/PluggableAuthService/ it's very easy to let 
zope authenticate against any kind of database or source (including 
MySQL/LDAP etc). And if it's a custom source it's not difficult to write 
your own authentication plugin.


Where and how are these accounts stored now? LDAD/ADS or something else?


Martijn.

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

___
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] acl_users folder 25000

2008-06-03 Thread Martijn Jacobs

Kees de Brabander wrote:

I have no idea.
I have been looking at the PAS, but did not find to much documentation 
on it.

Would it be possible to use a database that my client does maintain?
 
cb
Yes that would be possible. Take a look at 
http://plone.org/products/gmailauthplugin as it's a pretty nice example 
how to write a plugin yourself. You can also take a look at 
https://svn.plone.org/svn/collective/PASPlugins/



Martijn

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

___
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] acl_users folder 25000

2008-06-05 Thread Martijn Jacobs


It appears that the database of my client is not accessible. They 
can provide me an excel file with the members.


The intended application actually is an election. It is a one time 
thing. Every member is using this application once, and presumably not 
all of them. Would it still be unwise then to put these 25000 accounts 
in an ordinary acl_users folder?




You could import the users in a database (like mysql) and authenticate 
with a PAS plugin. Performance wise it could be really slow to have 25K 
users in a userfolder.


I found this userfolder today as well : 
http://www.simplistix.co.uk/software/zope/simpleuserfolder. You could 
easily write a ZSQL method for authentication for this (it's easier than 
writing a PAS plugin). If you have time or resources to write a PAS 
plugin I suggest to invest some time for that.



Martijn.

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

___
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] acl_users folder 25000

2008-06-05 Thread Martijn Jacobs
I wouldn't know, it seems like something is not correctly configured to 
reach the GMail server.


However, I suggested the gmailauthplugin as an example for writing a PAS 
plugin, not as a functional product for a website :)  Take a look 
authenticateCredentials in GMailAuthPlugin.py, there is where the 
authentication is happening.



Martijn.



Thanks for the link to the gmailauthplugin.

I am trying it out on plone 3 on a mac tiger laptop and I'm getting
the following error:


Exception Type  URLError
Exception Value urlopen error no host given

*  Module ZPublisher.Publish, line 110, in publish
* Module ZPublisher.BaseRequest, line 580, in traverse
* Module Products.PluggableAuthService.PluggableAuthService, line
233, in validate
* Module Products.PluggableAuthService.PluggableAuthService, line
600, in _extractUserIds
* Module Products.GMailAuthPlugin.GMailAuthPlugin, line 89, in
authenticateCredentials
* Module Products.GMailAuthPlugin.libgmail_incl.libgmail, line 320, in login
* Module Products.GMailAuthPlugin.libgmail_incl.libgmail, line
333, in _retrievePage
* Module urllib2, line 130, in urlopen
* Module urllib2, line 356, in open
* Module urllib2, line 943, in do_request_

Here is the environment specifics:

 Zope Version  (Zope 2.10.5-final, python 2.4.4, darwin)
Python Version 2.4.4 (#1, Feb 21 2008, 21:15:12) [GCC 4.0.1 (Apple
Computer, Inc. build 5250)]
System Platform darwin
SOFTWARE_HOME /Applications/Plone-3.0.6/lib/python

Any Suggestions?
Thanks in advance.
-Tim
www.medicinebrain.com


On 6/3/08, Martijn Jacobs [EMAIL PROTECTED] wrote:
  

Kees de Brabander wrote:


I have no idea.
I have been looking at the PAS, but did not find to much documentation
on it.
Would it be possible to use a database that my client does maintain?

cb
  

Yes that would be possible. Take a look at
http://plone.org/products/gmailauthplugin as it's a pretty nice example
how to write a plugin yourself. You can also take a look at
https://svn.plone.org/svn/collective/PASPlugins/


Martijn

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL
kvk: 09162137 | btw: 8161.22.234.B01
e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117






--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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 Martijn Jacobs

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.

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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] TALES expression

2008-07-16 Thread Martijn Jacobs



Hi!
Please consider this TALES expression:

div class=DataPrevista tal:content='here/getDataInici | string: 
nosta' /


If I try this other: div tal:content='string:${here/getDataInici}' / 
the result is divNone/div


Then the first one will render the alternate expression isn't it?

Then with it renders div class=DataPrevista / ?

Thanks!


I don't understand what you are asking. Could you describe your question 
more clear please.



Martijn.

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


___
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] Script (Python) insecure ?

2008-08-13 Thread Martijn Jacobs

Thanks Andreas, for creating a hotfix for this issue!



--On 12. August 2008 17:14:15 + Maurits van Rees 
[EMAIL PROTECTED] wrote:



Andreas Jung, on 2008-08-12:

After rough test: it seems to work for Zope trunk, 2.10 and 2.11
but has a failure for Zope 2.8.


I forgot to mention that the hotfix also seems to work for Zope 2.9.
(third-party confirmations are highly appreciated).


Update: the hotfix although works for Zope 2.8 (tested with
a running Zope instance - however the testrunner does not seem
to import Hotfix though the included tests under 2.8 aren't
found/executed).


In Zope 2.8, when I place the Hotfix in the Products dir of the
instance, the two tests pass when I run the tests like this:

  bin/zopectl test --dir=Products/Hotfix_20080812/

That's with: http://www.zope.org/advisories/Hotfix_20080812_0.1.tar.gz

I tested on Zope 2.8, 2.9, 2.10, 2.11.  All with python 2.4.  Without
the hotfix raise SystemExit crashed Zope.  I could not confirm the
other problem; that just gave me a LookupError.  With the hotfix in
the Products dir of the instance, the crash did not occur and the
tests passed.



Thanks for further testing. I released V 0.2 of the hotfix containing
your fixes. The hotfix also works with Zope 2.7...this should be enough.
If there are no objections I would like to release the hotfix 
officially at some time tomorrow.


Andreas


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



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

___
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-dev] Re: more on the segfault saga

2002-03-13 Thread Martijn Jacobs


Hello,

We also have the problem with zope crashing with segfault 11.
I've read al earlier posts on this subject, but couldn't notice anything
that could arrange a direct solution, or I should have missed something?

The only thing I can try is to describe our situation : 

- We have a production server running zope 2.5.1 beta (binary release,
linux), so the crash cannot be from the bugs listed in Matthews
Stability Howto.

- The crash occurs as well on Windows as on Linux, (both binary releases
2.5 beta 1, as well 2.5.0 as well 2.4.3 on both platforms)

- It happens only with alot of traffic (alot is more then 40
kbytes/sec, 500 users on a intranet, I hope I don't have to scale zope
with this little amount of traffic?)

- It DOESN't crash with the -t 1 option, so the crash has something to
do with threading. However, the performance is very poor with this
option, so this is not a good solution.

- We use a flash generator c extension module (ming), but with this
removed, it still crashes, so it's not a non-standard-zope c extension
module that can cause the crash.

- We DON't use any DA for relational access, so all earlier suggestions
that the mysql/oracle DA modules are causing the crashes should be
reconsidered

- ZOPE_SECURITY_POLICY=PYTHON is not taking away the crashes.

- We use our own python Products which are accessed when the crash
occures, but these products are very clean and totally written in
Python, so that should not be any problem I suppose, because Zope
doesn't crash in single thread mode. We also use alot of Python Scripts,
but these bugs are already fixed? (says the Stability Howto)

I don't know where to start, because attaching GDB doesn't make any
sense, since you have to start zope single threaded (according to Matts
Stability Howto) and then no crashes occur.

Is this problem solved if I install python 2.2 for example? Are there
any bugfixes in this release from Python 2.1.2 ?

I don't know what the status is right now? Is zope corp. working on it
trying to find the bug? Can I be of any help tracking down this bug? 


regards,

Martijn Jacobs
East Site
[EMAIL PROTECTED]



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Re: more on the segfault saga

2002-03-13 Thread Martijn Jacobs


 Actually, at least in Linux, with a recent gdb, you can attach gdb to
 zope in multithread mode. Just take the -t 1 from the command line
 sugested by the StabilityHOWTO and you're set. Best results are achieved
 by compiling everything from source (python even, use the
 --prefix=/path/to/zope-src so as not to mix up with your installed
 python and be careful to use this python when installing zope) and
 running:


Ok, I succeeded tying up the gdb on the production server. I have to
wait until tomorrow for results, because in the evening the intranet is
not used by the specific company :) Tomorrow it will crash for sure,
because it crashes about 20/30 times a day, so then I will post the
results as soon as possible!

It's very frustrating that we cannot reproduce this bug in out own
environment, whatever we try. (all workstations requesting like hell,
but we cannot succeed crashing it!)

It's very nice to hear that you people are trying to solve the problem,
also thanks to the guys from Zope Corp. who are spending there time for
it!

Hope the bug will be resolved soon.


kind regards,

martijn jacobs


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



  Re: [Zope-dev] Re: more on the segfault saga

2002-03-14 Thread Martijn Jacobs


Sorry, the correct URL is http://www.coherence.nl/crash.txt
(without the dot)


martijn.




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Fwd: [Zope-dev] Re: more on the segfault saga]

2002-03-26 Thread Martijn Jacobs


 Hello segfaulters and others interested in Zope instability issues!

Hello again :)


 Our demi-god Matt Kromer from ZopeCorp has come up with a possible way
 to corner the instability issue AND give you a stable, cycle-garbage
 collecting Zope.

We probably should build a statue for this guy somedays


 Since the problem seems, so far, to be caused by the Python Restricted

 Compiler (which is used in everything from dtml expressions to python
 scripts to other stuff) not completing fully collectable objects
 before the Python cycle garbage collector finds them, the solution 
 is to lock
 out the gc while creating these objects. The only easy way to do this
 currently is to disable the automatic gc and run manual garbage
 collections only when we're pretty sure no one else is running, and at
 the same time not letting anyone else run when we're running the gc.

Just to make sure : I put gc.disable() in Z2.py and apply this
ZServerPublisher.py patch? Or do I have to add some more code to let the
garbage collector collect more often or less or...


 We're close guys, very close.

You can't imagine how glad I would be if this thing is fixed. Thanks
again for all your efforts!


Martijn Jacobs
East Site

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



re: [Zope-dev] Crashing problem? Python workaround?!

2002-03-27 Thread Martijn Jacobs

Hi Matt, Leo

 Pythonlabs found this today after much assistance from the folks on 
 #zope on the irc.openprojects.net system; particularly, Leonardo Rochael 
 Almeida's assistance has been extremely valuable in isolating this
 problem.

And jus to say it again : thank you all again!! You've made a customer
very happy again!

 This is an intermediate workaround until Pythonlabs develops an official 
 fix.  However, by using this workaround, you do not need the specially 
 modified ZServerPublisher module I coded.

Will this patch be included in the next Zope binary releases? I could
build a zope for on a particular environment, but it would be alot
easier to upgrade all customers with the new binary release.

Anyway : In other words : if this is added in the official Python
release, the bug is cleanly resolved?


-- 
martijn jacobs
east site

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: ZMI / JavaScript brainstorm

2002-04-08 Thread Martijn Jacobs

What is wrong with editing the files trough FTP / WebDAV? I've mounted a
complete zopedatabase on a directory, and you can edit all files with
your favorite editor. Why wanting such editing posibilities in a easy to
use , in everybrowser working interface like the ZMI?



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: ZClasses useful! [Was: ZMI / JavaScript brainstorm]

2002-04-09 Thread Martijn Jacobs

 I will not stop dissing them until people stop using them and then
complaining
 when they break, don't do what they want or behave unexpectedly.

What's your efford on this task? If people like to use them, let them!
It's not up to you to decide for THEM what's best or not. The choice for
YOURSELF not to use them is just as fair as other peoples choices.



martijn.






___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Slow zope on windows 2000?

2002-08-29 Thread Martijn Jacobs

Hello Casey,

 One thing to remember is that running multi-treaded Python apps on a 
 multi-processor box is suboptimal unless you can bind all the threads to a 
 single processor, due to the Python GIL.

IOW : Buying a dual processor computer is not so usefull if the computer
is dedicated running zope? And if you have to use a dual CPU computer,
binding all the threads to a single processor increases zope
performance? (If so, how can you do that? :)

 The only way to do a true comparison would be to run the same tests on the 
 same app on the same hardware with the same load but with different OSes.

That's true. I was wondering if you guys at zope comp. have any recent
benchmarks yourself with the different Operating systems?


Martijn.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Overriding Products

2005-03-15 Thread Martijn Jacobs
Hello guys.
I have a question regarding  product importing in zope 2.7.x,  as since 
zope 2.7 this part is way more flexible then it was before. I'd like to 
accomplish the next situation :

-
A Zope base installation has Product X installed in /lib/python/Products 
which I want to change or develop further
-
x instances of Zope use the produtc from this base install.
-
At one instance I want to test and develop, without breaking the other 
instances.
-
Copying the Product X folder to the instance_home/Products folder is 
not an option, as import conflict errors occure if you do not remove the 
product from the base installation.
-
Copying a local version in all 4 instances is a solution, but to manage 
that will cost alot of work, especially if you have alot of instances.
-

What I really want is that you can copy the Product X folder to the 
Products (or CustomProducts for example) of an zope instance, and that 
zope will figure out itself that it should import that version of the 
product instead of the copy in the base installation. 'Overriding' base 
products is the name you could give this situation.

I tried alot myself, for example checking in the __init__.py if there is 
a copy of this product in instance_home/CustomProducts and then 
importing that product instead of my own, but I always get into trouble :

AttributeError: 'module' object has no attribute 'Classname'
It doesn't have to work for all products, only for some of the products 
that we are developing ourselfs. We also have a different structure than 
normal products as following :
Main Product   - Sub product X
  - Sub product Y

In the __init__.py of Main product we import and initialize the 
subproducts. The idea is to put one of those subproducts in a zope 
instance/CustomProducts folder for further development and that the 
other instances of zope still uses the base version of the subproduct.

I hope you can help, thanks in advance for your time.
Kind regards,
--
Martijn Jacobs
East Site | Postbus 642 | 6800 AP Arnhem
t: +31 (0) 26 35 14 295 | f: +31 (0) 26 44 20 432
@: [EMAIL PROTECTED]  | w: www.eastsite.nl
___
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] Folderish or SimpleItem object types for structural content

2005-11-28 Thread Martijn Jacobs

Hello guys!

I have a simple question about the design of hierarchical zope product 
structures in Zope 2. For example, you have categories, within 
categories you have sub-categories, within sub-categories you have 
sub-sub categories, within that you have content items, within content 
items you haveetcetera.


All those products are different 'types', with different functionality 
and different 'roles' as what they represent, so I write different 
products for every type. For every object that can contain subobjects 
you could derive it from 'Folder' (or Object Manager). But when you 
derive all these product types from 'Folder' you end up with ALOT of 
objects in your database.


In a lot of real world cases you have categories and items, that makes 
things easy, but what about the structure explained above?


My question for you guys is : When do you decide to make it a Folderish 
object which contains sub-objects, or to make it a Simple Item object 
with, for example, some structured XML content, or dictionary / list 
properties containing the 'sub-structure'? The last option is more work, 
because you have to write your add/edit/delete/etc code yourself, 
writing it with Folders makes it more easily, but then you have an 
explosion of objects in the ZODB.


I would like to have some fresh thoughts about this, so maybe you can help.


Thank you in advance,

kind regards,

Martijn.

--
Martijn Jacobs
Four Digits, internet solutions
e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117

___
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] Folderish or SimpleItem object types for structural content

2005-11-29 Thread Martijn Jacobs




Hello Dieter.

  
...For every object that can contain subobjects 
you could derive it from 'Folder' (or Object Manager). But when you 
derive all these product types from 'Folder' you end up with ALOT of 
objects in your database.

  
  
It that a problem? It might become one once you get millions of objects...

Usually, I would expect that most objects come from you leaves and
not from the classification structure...
  

That will be true, but I was wondering where to draw the line, for
example with perfomance issues. All the objects will be in a ZCatalog,
to allow searching for example. But one 'ObjectManager' step less in
the choice what to do with the products results in much less objects in
the catalog. The estimation about the amount of objects, with only the
leave nodes as 'SimpleItem' objects will be 30.000. I never had so many
objects in a ZODB, that's why I'm asking this, but as your answer
suggests it's still the preferred way.

Thanks for the comments!

-- 
Martijn Jacobs
Four Digits, internet solutions
e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117



___
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] Folderish or SimpleItem object types for structural content

2005-11-30 Thread Martijn Jacobs


Hello Dieter.


This must be a funny classification scheme...
 

Well, I wanted to have the discussion to be general about this thing 
because I can imagine that this issue has been some point of discussion 
before, among others, but I will be more specific to explain :
- The structure will have categories within categories. (hierarchical 
categories)
- Each category can have custom properties which can be 'inherited' by 
the aqcuisition feature of zope.

- Within the categories you have object's.
- Each object can derive his properties through acquisition, or have 
their own properties (or override the acquisiton properties)
- Each object will have item groups,  with their own properties / 
files / comments / etc.
- Each item group will contain  items, each item will have 
properties, but also can have properties derived through acquisition 
from categories and objects :  so these items will all have different 
properties, depending in which category they exist.


With this rules I was thinking about the next structure :

Category (Object Manager, within other Categories) - Object (Object 
Manager) - Item Group (Object Manager) - Item (Simple Item)



But anyway: I have a completely different strategy for you:
lets see whether you will like it.

You do not materialize the classification scheme at all but you
have only your leaves (let's call them objects).

Each object has its classification as an attribute, say category.
A category thus has the form topic/subtopic/subsubtopc/

You index the category with a PathIndex (I would recommend
my Managable PathIndex) and use canned searches (so called topics)
the recreate the classification structure via searches (if needed).


If you do the last step (use topics for the complete recreation of the
classification structure), then the number of objects will
not decrease (what formerly was a classification folder is now
a topic). But the new structure is much more flexible.
You can now assign different categories (say along different
dimensions) to your objects and will get different hierarchical (topical)
views on your object set.
 

I have been thinking about this kind of structure to use for this 
specific project. But there is a problem that occures (too) often (in my 
experience) with this approach. By doing this you really are depending 
on the ZCatalog : If some conflict errors occure or for some reason the 
objects are not indexed (correctly) or not updated, some important 
information is not available for the user. I have experienced alot of 
problems with unindexed objects, or not reindexed objects due to 
'random' conflict errors'.  By making a complete hierarchical structure 
using 'Object Managers', you can always assure that data is accessible, 
and if the ZCatalog is not up to date, only the search results will not 
represent the actual structure.



30.000 is not yet very impressing.
 

That's good to know. It's hard to say offcourse, but what is in some way 
a 'limit' of the number of objects, for instance, if they all have to be 
indexed? Indexing objects uses ALOT of CPU time for example... In which 
amount of objects should you reconsider your design? (Speaking of a 
'general' guideline)



You should take care to use the correct folder implementation, however.
As soon as a folder is likely to have more than a few dozen of objects,
you should use a BTreeFolder2 rather than a normal folder.
 

I've used the BTreeFolder2 before for a single folder containing large 
number of objects, and indeed, it's really boosting the perfomance a lot...


Well thanks again for your thoughts, it helps in breaking patterns I'm 
used too,  let's reconsider it using some external input :)



Kind regards,

Martijn.


--
Martijn Jacobs
Four Digits, internet solutions
e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117

___
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] Please help the zope.org improvement efforts

2008-06-30 Thread Martijn Jacobs


 2. People to step up and own pages or sections. This means 
contributing content! 
I've volunteered a while ago but haven't found the time to do what I 
wanted to do. I will make time for this the following two / three weeks 
and write some content.



Martijn.

--
Martijn Jacobs
Four Digits, Internet Solutions

___
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] ZCatalog sorting issue

2008-07-10 Thread Martijn Jacobs

Wat denk je hiervan?


Hello.

In zope 2.10.5 (and probably 2.10.6 and 2.11 and, as I've read, all 
releases above 2.7) we've encountered a sorting bug in a dtml-in call

when querying the catalog. I don't think it's dtml only related, but I'm
not sure about that. It is the same bug as found on :

https://bugs.launchpad.net/zope2/+bug/143504

Adding

def __cmp__(self, other): return 0

to

Products.ZCatalog.CatalogBrains.AbstractCatalogBrain

seems to correct the problem though and I was wondering why this isn't
added in the zope core. Does it break other stuff or should the problem
fixed somewhere else? Somebody has some thoughts?



Regards,


Martijn

--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL
kvk: 09162137 | btw: 8161.22.234.B01
e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117


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