[Zope3-Users] Status of zsync

2008-01-19 Thread Achim Domma

Hi,

I'm interested in zsync, but cannot find much information via google.  
I'm using Zope 3.4b2 and there are docs for zsync but the tool seems  
not to be included!? I'm developing a small zope app and I want to  
sync my ZPT pages with the filesystem. Or is there another way to  
develop ZPT pages via filesystem using a text editor like vim?


regards,
Achim 
___

Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] ImportError running bin/zopectl run myScript.py

2008-01-17 Thread Achim Domma

Hi,

I try to run a script on my zope instance via "bin/zopectl run  
myScript.py". I get the following error:


Traceback (most recent call last):
  File "/Users/domma/develop/zope/demo/bin/scriptzope", line 22, in ?
import paths
ImportError: No module named paths

I cannot find a paths.py on my system. Any hint what I'm doing wrong?

regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Beginner: Reference to ZPT macros

2008-01-16 Thread Achim Domma

Hi,

I have a simple view. Here is the entry in configure.zcml:

  

The view works fine so far, but now I want to use a template macro to  
implement a common layout. So I created a layout.pt in the same  
folder as index.pt. In index.pt I try to reference layout.pt like this:


http://xml.zope.org/namespaces/metal"; metal:use- 
macro="context/@@layout.pt/macros/default_layout">






Now I get an TraversalError but I could not figure out why. How do I  
have to reference layout.pt? Do I have to register the emplate  
somehow? I work with Philips book, but he uses a template created via  
ZMI in his example.


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Next steps...

2006-07-24 Thread Achim Domma

Philipp von Weitershausen wrote:

Tim Penhey wrote:

Does this mean that a second edition is in the works?

Yup.


Nice to hear! The first edition helped me a lot. Is there already a time 
frame when it will be available? And is there a wish list for topics I 
want to see? ;-)


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Debugging Zope3 with Winpdb

2006-07-23 Thread Achim Domma

Hi,

I try to debug zope 3 with winpdb, but without success. Was anybody able 
to let zope 3 run within winpdb. Winpdb seems to start my z3.py script 
but the looses the connection to the process. I see no error messages 
and I'm quite new to winpdb.


Any help would be very appreciated!

regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Expressing n:m relationship in ZODB

2006-07-11 Thread Achim Domma

Leonardo Rochael Almeida wrote:


In usual Object Oriented modeling, an n:m relationship is usually
modeled as a collection of relationship objects each one keeping one
direct reference to each side of the relationship. Of course, using
these systems that already try to model relationships helps you not to
reinvent another wheel.


I think I understand. So if I would like to reinvent another wheel, just 
for the educatinal purpose, I should do it like this:


If I have IArticle and IProject which should have a relationship, I 
would introduce IArticleProjectRelation which holds a reference to the 
related objects. These relation objects will be managed by an 
IArticleProjectRelationManager which has an interface like:


relate(article,project)
unrelate(article,project)
get_related_articles(project)
get_related_projects(article)

In that case, IArticleProjectRelation would be an implementation detail 
of IArticleProjectRelationManager and I do not have to expose it at all. 
And in Zope 3 terms, I would implement the manager as a local utility. 
Right so far?


If yes, I could add helper methods to IArticle and IProject which 
encapsulate the access of the utility to hide this detail from the user. 
Would you do that? Or has it some drawbacks which I don't see yet?


thanks for your help,

Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Expressing n:m relationship in ZODB

2006-07-11 Thread Achim Domma

Hi,

there was a discussion about the bad idea to simulate a relational 
database in ZODB using indexes and unique ids. So I wonder what's the 
"correct" way to express a n:m realtionship between objects.


For example: I have projects and articles. An article might be relevant 
for multiple projects and a project might have multiple relevant 
articles. Could I simply give each object a list containing the related 
objects? Or is this kind of circular reference a problem?


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Zope 3 as WSGI app using mod_python

2006-07-08 Thread Achim Domma

Hi,

I'm interested in running Zope 3 via mod_python as WSGI app directly in 
apache. I like the idea to configure different instances simply in my 
apache config and don't have to setup different running zope instances.


The "official" docs do not say much about this option, but there is a 
WSGI handler and I found for example this sample configuration:


http://codespeak.net/svn/z3/modzope/trunk/democonf/apache2.conf

Could somebody tell me what the status of this stuff is? Is it just an 
experiment which might be dropped in the future? Has somebody 
experiences to share?


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] ForbiddenAttribute: ('append', []) using append on PersistentList

2006-06-17 Thread Achim Domma

Achim Domma wrote:

I have implemented a view for a catalog index. The page template 
contains this little form to add strings to a list of categories:

[...]

class EditView(object):
def categories(self):
return self.context.categories

def add_category(self,name):
self.context.categories.append(name)

[...]
If I submit the form, add_category is called, but I get the following 
error:


ForbiddenAttribute: ('append', [])


To answer my own question: It works if I don't manipulate the list in 
the view, which is bad anyway. If I add a addCategory to the content 
object and use this method in the view, it's ok.


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] ForbiddenAttribute: ('append', []) using append on PersistentList

2006-06-17 Thread Achim Domma

Hi,

I have implemented a view for a catalog index. The page template 
contains this little form to add strings to a list of categories:




   


The view class looks like this:

class EditView(object):
def categories(self):
return self.context.categories

def add_category(self,name):
self.context.categories.append(name)

Together they are registered as:





If I submit the form, add_category is called, but I get the following error:

ForbiddenAttribute: ('append', [])

Any hint what I'm doing wrong?

regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Create catalog index via script

2006-06-17 Thread Achim Domma

Hi,

I have a workspace object, which I initialize in the 
IObjectCreatedEvent. I try to add a catalog with an index like this:


ensureUtility(workspace,zope.app.intid.interfaces.IIntIds,'',IntIds,asObject=True)
catalog=ensureUtility(workspace,zope.app.catalog.interfaces.ICatalog,'',Catalog,asObject=True)
catalog["tmp"]=CategoryIndex()

workspace derives from Folder and is already a Site at this point. The 
last line causes the following error:


ComponentLookupError: (zope.app.intid.interfaces.IIntIds>, '')


If I remove the line, it works fine. I can see the Catalog in my 
Workspace and can add the CategoryIndex without problem!?


Seems like I'm missing something in the setup of the IIntIds utility, 
but I have no idea what it is.


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Zope, IIS, IHttpHandler

2006-06-11 Thread Achim Domma

Hi,

I searched for informations about Zope and IIS. It seems that this was a 
problem with Zope 2 and older IIS versions. I don't know much about Zope 
2 but with with my Zope 3 knowledge I guess this should be easier for 
Zope 3 and an IIS running Asp.Net.


Implementing an IHttpHandler in C# which forwards requests to Zope 3 
should be much easier than implementing a ISAPI filter in C++ in "the 
old days".


Searching the web I found nothing about this topic. So, do I miss an 
obvious problem? Or is simply nobody interested in running Zope behind IIS?


I'm just wondering and I'm considering starting such a project.

regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Generate view for adapted interface

2006-06-11 Thread Achim Domma

Hi,

I'm implementing an annotations adapter following the "IRatbble" example 
in Philips book. Now I want to have a "Dublin Core" like edit view in ZMI.


The most simple solution seems to be to register a view for the original 
interface. In this view I would adapt the context object and would then 
use formlib to generate the forms automaticaly.


But I wonder if this could be done in a declarative way in ZCML. 
Something like "register edit view for IInterfaceA, but adapt it to 
IInterfaceB and create view for this interface".


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Custom index implementation

2006-06-06 Thread Achim Domma

Tom Dossis wrote:


You need to specify an addMenuItem directive and associated "view" in
your package browser zcml to enable you to add your index objects via
the ZMI.  Look at zope/app/catalog/browser/configure.zcml as a starting
point, e.g.


Thanks for the hint and sorry for asking such obvious things. But I'm 
still a Zope beginner and digging into a new topic I sometimes forget 
what I've already learned. :-(


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Custom index implementation

2006-06-05 Thread Achim Domma

Hi,

I try to implement a custom index to be inserted into a catalog. I look 
at the code and it seems to me, that I only have to derive my interface 
from ICatalogIndex. I have defined my interface like this:


class ITestIndex(zope.app.catalog.interfaces.ICatalogIndex):
pass

Then I have implemented a class which implements this interface and have 
it registerd like this:






If I restart zope and go to my catalog, I still can only add FieldIndex 
and TestIndex. What else do I have to do, to implement a custom index?


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] testing using placefulSetUp, zcml and events

2006-06-05 Thread Achim Domma

Hi,

I have a content object I want to set up in a IObjectCreatedEvent event 
handler. I want to use the interactive interpreter to play with this, 
but it looks like my configure.zcml is not parsed and executed if I use 
placefulSetUp.


How do I have to setup my environment to test zcml configured events 
from command line? Basically I want to write something like


some_setup_method()
root["ws"]=Workspace() # should trigger and handle IObjectCreatedEvent
for key in root["ws").keys():
print key

to check if the object is setup correctly.

regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Catalog, Index and IIntIds

2006-06-04 Thread Achim Domma

Florian Lindner wrote:


Have you registered the IntIDs utility?


Yes, but I just found a posting which told me, that I have to register 
it without a name. The problem was, that I registered it with a name.


Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Catalog, Index and IIntIds

2006-06-04 Thread Achim Domma

Hi,

I just started to experiment with catalogs and indexes. I have created a 
test folder, converted it into a site and added a catalog. Then I have 
tried to add an index, but get the following error:


ComponentLookupError: (zope.app.intid.interfaces.IIntIds>, '')


After that, I was not able to delete the catalog. I had to delete my 
Data.fs and start from scratch. I tought that a catalog might require a 
registered IIntIds provider, so I repeated the steps above, but I 
created a "Unique Id Utility" before I created the catalog. But I still 
get the same error.


Documentation for catalog and index is quite short and looks not very 
complicated. But didn't see a reference to IIntIds!?


What am I doing wrong?

regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Create RSS feed

2006-05-31 Thread Achim Domma

Hi,

I want to provide an RSS for a content object which is a site. Seems to 
me, like this should be a generic functionality so I wonder if there is 
already some product which I did not found!?


regards,
Achim

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Problem with containment and @@absolut_url

2006-05-30 Thread Achim Domma

Mats Nordgren wrote:


context/articles would return the id's

[...]

The id is a string which has a title method (capitalize each worlds first
letter); this is why your article/title is working.

[...]

You probably should use context/articles/values for the loop.


Thanks, it works now. The availability of 'title' confused me. I didn't 
knew about this method.


regards,
Achim

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Problem with containment and @@absolut_url

2006-05-29 Thread Achim Domma

Hi,

I have implemented ArticleFolder and Article like this:


class Article(Persistent,Contained):
implements(IArticle)
title=u''
body=u''

class ArticleFolder(Folder):
implements(IArticleFolder)


Via ZMI I can add, edit and delete articles without problems. I use this 
TAL statement in a view for the object holding the article folder :



asdf 


This fails with an "There isn't enough context to get URL information." 
exception. When the exception is thrown, I see in the debugger, that the 
context of AbsoluteUrl is the id of the first article as unicode string. 
And this string has of course no __parent__ attribute!?


I argued that context/articles might return ids, not objects, but in 
that case article/title should fail also. But if I remove 
tal:attributes, it works fine.


Am I missing something?

regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] There isn't enough context to get URL information.

2006-05-25 Thread Achim Domma

Stephan Richter wrote:


On Thursday 25 May 2006 05:50, Achim Domma wrote:

class Workspace(Persistent):
 implements(IWorkspace)


This is your problem. Workspace is not implementing ILocation (or IContained).


Thanks a lot! It works now! Do I understand the problem right:

I was able to insert a Workspace into a folder, because it is proxied 
automatically by a ContainedProxy. The contained ArticleFolder gets the 
Workspace instance as parent, but not the ContainedProxy which holds the 
required __parent__ attribute? That's the problem, right?


Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] There isn't enough context to get URL information.

2006-05-25 Thread Achim Domma

Hi,

I try to figure out how to make attributes holding content objects 
accessible via the browser. Using the code below, I get a "There isn't 
enough context to get URL information." exception if I try to access the 
attribute via URL or via Introspector.


The exception is raised in the breadcrumbs function in absoluteurl.py. 
It looks like the __parent__ attribute of the contained object is not 
set, but I don't understand why?


This is the interface of the object holding subobjects:

class IWorkspace(ISimpleReadContainer):
title = TextLine(
   title=u"Title",
   description=u"The title",
   default=u"proCoders Workspace",
   required=True)
projects = Container(title=u"Projects", description=u"xxx")
articles = Container(title=u"Articles", description=u"xxx")


The object is implemented as:

class Workspace(Persistent):
implements(IWorkspace)
title=u'proCoders workspace'
projects=None
articles=None

def __getitem__(self,key):
return getattr(self,key)

def get(self,key, default=None):
return getattr(self,key)

To initialize projects and articles, I have registered an event 
subscriber:


def onObjectCreated(parent,event):
if IWorkspace.providedBy(event.object):
workspace=IWorkspace(event.object)
setitem(workspace,
  workspace.__setattr__,"projects",ProjectFolder())
setitem(workspace,
  workspace.__setattr__,"articles",ArticleFolder())

regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Create complex object

2006-05-25 Thread Achim Domma

Achim Domma wrote:


class IWorkspace(Interface):

[...]




[...]

Thanks to Frank for his solution, but I should not post messages late at 
night: I simply added the fields="title" attribute to the wrong 
browser:addform.


If I add the attribute to the right tag, it works fine. Just for the 
records, in case somebody has the same problem.


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Create complex object

2006-05-24 Thread Achim Domma

Hi,

I have the this interface

class IWorkspace(Interface):
title = TextLine(
   title=u"Title",
   description=u"The title",
   default=u"proCoders Workspace",
   required=True)
projects = Container(title=u"Projects", description=u"xxx")
articles = Container(title=u"Articles", description=u"xxx")

with the following implementation

class Workspace(Persistent):
implements(IWorkspace)
title=u'proCoders workspace'
projects=None
articles=None

To set projects and articles I have registered an event subscriber. The 
handling functions is defined like this:


def onObjectCreated(parent,event):
if IWorkspace.providedBy(event.object):
workspace=IWorkspace(event.object)
workspace.projects=ProjectFolder()
workspace.articles=ArticleFolder()

I registered an add form with the following zcml statement:



I added the fields="title" attribute, because I get the following error, 
if I try to create an instance of Workspace:


ComponentLookupError: ((It's clear to me, that the widgets for projects and articles can not be 
created, but I tought that if I set fields="title" I will not show them!?


How do I solve this problem? Should I implement a mix-in class for the 
add view?


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Reference to a COM object (or other external resource) in a Zope object

2006-05-24 Thread Achim Domma

[EMAIL PROTECTED] wrote:

I am creating a kind of Zope proxy to a 3rd party COM object (I'm accessing it using Pywin32 facilities). 
I have to store a reference to this object somewhere in my Zope object.
But, for obvious reasons, this COM object cannot be serialized so I cannot put it in any attribute of my Zope object. 
On the other side, initialisation of the object on each request is too time&cost-consuming. 


With my still somewhat limited Zope knowledge, I would say it sounds 
like you should have a look at utilities.


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Changes on object not persistent if server is restarted.

2006-05-22 Thread Achim Domma

Jachin Rupe wrote:


You could try making "Acrticle" inherit from "Persistent".


Ups! That's really a very stupid error. Thanks for your fast answer and 
sorry for bothering the list with such trivial problems.


regards,
Achim

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Changes on object not persistent if server is restarted.

2006-05-22 Thread Achim Domma

Hi,

I have written this simple content object:

class IArticle(Interface):
title = TextLine(
title=u"Title",
description=u"The title",
default=u"",
required=True)

body = Text(
title=u"Body",
description=u"Article Body",
default=u"",
required=True)

class Article(object):
implements(IArticle)
title=u''
body=u''

The body of the article is rendered as restructured text. I can create 
and edit articles via the automatically generated forms. Everything 
worked fine, but currently my changes are not persistent if I restart 
the server.
The body is not empty after restart, but holds an older version. I'm 
working with the SVN version of Zope 3.


Any hint what I might be doing wrong?

regards,
Achim

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: How to distribute distinct components among multiple Zope servers?

2006-05-17 Thread Achim Domma

Reinhold Strobl wrote:


Consider the followng example: one company has got a Zope application running on
a single server. This applications need the components of e.g. the supplier of
the component running on a different server. So I don't want to mirror both,
because the both companies are more or less independent. So I assume the only
possible is XML-RPC (with its limitations of restricted data types and so on)?


I'm not a Zope expert, but to me it sounds like you want to solve a 
problem with Zope, which it is not intended for. If you want to 
implement complex distributed scenarios use SOAP, XML-RPC, CORBA, DCOM, 
... or whatever suits your needs.
Then you could still implement a thin Zope utility, which wraps access 
to such an service, to allow easy access from within a Zope application.


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Composing content objects

2006-05-16 Thread Achim Domma

mats.nordgren wrote:


def __init__(self, schema, **kw): < you need to pass a schema as a non
key-word



Thanks! That solved my problem. Now I get a component lookup error, but 
I think this is, because there is no default widget for the object. So I 
have to register one via zcml. Am I right?


regards,
Achim

PS.: Also thanks to Dominik, which pointed me to the same solution.
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Composing content objects

2006-05-14 Thread Achim Domma

David Johnson wrote:


The exact traceback would be useful. Can you post it?


The traceback follows below.

regards,
Achim



Traceback (most recent call last):
  File "C:\develop\ZopeWorkspace\Zope3\z3.py", line 64, in ?
run()
  File "C:\develop\ZopeWorkspace\Zope3\z3.py", line 60, in run
main(argv[1:])
  File "C:\develop\ZopeWorkspace\Zope3\src\zope\app\twisted\main.py", 
line 74, in main

service = setup(load_options(args))
  File "C:\develop\ZopeWorkspace\Zope3\src\zope\app\twisted\main.py", 
line 139, in setup

zope.app.appsetup.config(options.site_definition, features=features)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\app\appsetup\appsetup.py", line 
110, in config

context = xmlconfig.file(file, context=context, execute=execute)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\xmlconfig.py", 
line 554, in file

include(context, name, package)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\xmlconfig.py", 
line 490, in include

processxmlfile(f, context)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\xmlconfig.py", 
line 345, in processxmlfile

parser.parse(src)
  File "C:\Python24\Lib\site-packages\_xmlplus\sax\expatreader.py", 
line 109, in parse

xmlreader.IncrementalParser.parse(self, source)
  File "C:\Python24\Lib\site-packages\_xmlplus\sax\xmlreader.py", line 
123, in parse

self.feed(buffer)
  File "C:\Python24\Lib\site-packages\_xmlplus\sax\expatreader.py", 
line 216, in feed

self._parser.Parse(data, isFinal)
  File "C:\Python24\Lib\site-packages\_xmlplus\sax\expatreader.py", 
line 364, in end_element_ns

self._cont_handler.endElementNS(pair, None)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\xmlconfig.py", 
line 326, in endElementNS

self.context.end()
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\config.py", line 
544, in end

self.stack.pop().finish()
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\config.py", line 
690, in finish

actions = self.handler(context, **args)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\xmlconfig.py", 
line 490, in include

processxmlfile(f, context)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\xmlconfig.py", 
line 345, in processxmlfile

parser.parse(src)
  File "C:\Python24\Lib\site-packages\_xmlplus\sax\expatreader.py", 
line 109, in parse

xmlreader.IncrementalParser.parse(self, source)
  File "C:\Python24\Lib\site-packages\_xmlplus\sax\xmlreader.py", line 
123, in parse

self.feed(buffer)
  File "C:\Python24\Lib\site-packages\_xmlplus\sax\expatreader.py", 
line 216, in feed

self._parser.Parse(data, isFinal)
  File "C:\Python24\Lib\site-packages\_xmlplus\sax\expatreader.py", 
line 364, in end_element_ns

self._cont_handler.endElementNS(pair, None)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\xmlconfig.py", 
line 326, in endElementNS

self.context.end()
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\config.py", line 
544, in end

self.stack.pop().finish()
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\config.py", line 
690, in finish

actions = self.handler(context, **args)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\xmlconfig.py", 
line 490, in include

processxmlfile(f, context)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\xmlconfig.py", 
line 345, in processxmlfile

parser.parse(src)
  File "C:\Python24\Lib\site-packages\_xmlplus\sax\expatreader.py", 
line 109, in parse

xmlreader.IncrementalParser.parse(self, source)
  File "C:\Python24\Lib\site-packages\_xmlplus\sax\xmlreader.py", line 
123, in parse

self.feed(buffer)
  File "C:\Python24\Lib\site-packages\_xmlplus\sax\expatreader.py", 
line 216, in feed

self._parser.Parse(data, isFinal)
  File "C:\Python24\Lib\site-packages\_xmlplus\sax\expatreader.py", 
line 364, in end_element_ns

self._cont_handler.endElementNS(pair, None)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\xmlconfig.py", 
line 326, in endElementNS

self.context.end()
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\config.py", line 
544, in end

self.stack.pop().finish()
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\config.py", line 
689, in finish

args = toargs(context, *self.argdata)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\config.py", line 
1381, in toargs

args[str(name)] = field.fromUnicode(s)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\fields.py", line 
139, in fromUnicode

value = self.context.resolve(name)
  File 
"C:\develop\ZopeWorkspace\Zope3\src\zope\configuration\config.py", line 
184, in resolve

mod = __import__(mname, *_import_chickens)
  File 
"C:\develop\ZopeWorkspace\ZopeProducts\src\proCoders\interfaces.py", 
line 14, in ?

class IWorkspace(Interface):
  Fi

[Zope3-Users] Composing content objects

2006-05-13 Thread Achim Domma

Hi,

thanks to Phillips book and the help from this list, I managed to write 
some usable content objects, to implement some views and to skin this 
views. Now I have a new problem:


I have implemented IArticle, IArticleFolder, IProject and 
IProjectFolder. IArticle and IProject are simple content interfaces 
which work so far. The folder interfaces are simply derived from 
IFolder. They have constraints, so that only the correct types can be 
inserted.


Now I try to implement IWorkspace, which should have a property 
'projects' being an IProjectFolder instance and a property 'articles' 
being an IArticleFolder.


My current version looks like this:

class IWorkspace(Interface):
title = TextLine(
   title=u"Title",
   description=u"The title",
   default=u"Workspace",
   required=True)

projects = Dict(
key_type=Id(title=u"ID",description=u"xxx"),
value_type=Object(title=u"Object",description=u"xxx"),
title=u"Projects",
description=u"Projects in this workspace")

articles = Dict(...)

When I try to start Zope, I get the following error message:

ZopeXMLConfigurationError: File "C:\...\configure.zcml", line 3.4-3.100
  TypeError: __init__() takes exactly 2 non-keyword arguments (1 given)

The matching line in configure.zcml looks like this:

type="zope.app.content.interfaces.IContentType" />


I have no problem reading code, but I don't know how to figure out which 
__init__ causes the error. Neither Dict, nor Id or Object seem to have a 
__init__ which might cause this message!?


Can somebody enlighten me? Am I thinking in the wrong direction? Is 
there a better way to combine content objects? Any hint is very welcome?


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Skinning in Zope 3.3

2006-05-13 Thread Achim Domma

David Johnson wrote:


Both of the Zope 3 developer's books explain this quite well.  I think
Phillip's has the shortest example.  Skins are one of the few Zope 3
concepts I was able to implement quickly.  All sources will assume that you
understand TAL, and METAL. 


You can download the source from either book either of the Zope 3 SVN or the
worldcookery site.


Thanks for the hint. I'm learning Zope mainly based on Phillips book. 
The book is very good, but the skinning example was too short for me. 
;-) But together with the online version of the "Zope Developer Book" I 
was able to figure out how to skin my app.


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Skinning in Zope 3.3

2006-05-11 Thread Achim Domma

Hi,

I try to understand how to customize the look & feel of my page using 
the new skin/layer implementation of version 3.3. I followed the example 
on 
http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/SimplifySkinning 
 but still don't understand on how to change the layout of my page.


Could somebody provide a short hint on how to override 
@@standard_macros/page for the ShanghaiSkin in the example above?


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Zope, WebDAV, MS Word

2006-05-08 Thread Achim Domma

Hi,

I'm able to connect from Windows via WebDAV to a Zope instace and can 
read the content of my zope objects. But I'm not able to edit the files, 
because all files are opened read-only. I have tried MS Word and 
OpenOffice. Both show the same behavior.


Searching the web, I found some old postings by Andreas Jung which state 
that the "read only" problem has been fixed in Zope 2.x!?


Is there still a problem with Zope 3, WebDAV and Windows? Any hint how 
to edit objects via Microsoft Word or OpenOffice Writer?


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Integrating text indexing engine into Zope 3

2006-04-28 Thread Achim Domma

Hi,

I want to integrate support for a specialized text indexing engine into 
Zope 3. The engine is able to provide documents which are "similar" to a 
reference document.


First I had a look at ICatalog, but IInjection seems to be the way to 
go. Could somebody give me a high level overview on how to use / 
implement these interfaces?


I currently think about the following steps:

- Implement the index as local utility.
- Define an interface IMyStorageDocument for documents to be stored in 
my index.
- Capture somehow if objects are created or deleted. Check if the object 
can be adapted to IMyStorageDocument. If yes, store it in the index or 
remove it.


Clients then only have to implement an adapter for documents which 
should be indexed. To search for documents one could access the index as 
local utility.


I'm still a Zope beginner and would be happy to have some guidance into 
the right direction.


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Debugger for Zope 3

2006-04-25 Thread Achim Domma

Hi,

could somebody recommend a good visual debugger (not pdb) which can be 
used with Zope 3?


I would like to start Zope 3 with the debugger, set some breakpoints in 
my modules and step through the code to learn more about Zope.


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Understanding authentication

2006-04-15 Thread Achim Domma

Hi,

I have created a folder "main" below [top] and converted it into a site. 
I added a PAU to the site management folder and a Principal Folder to 
the PAU. I registered all utilities.


Then I created a new principal "demo1" and after that a new subfolder 
below "main". I switched to the subfolder and granted management and 
view permissions to "demo1".


But I'm not able to login as "demo1"!? If I add "Session Credentials" 
utility to the PAU, I get an endless loop which tries to redirect to a 
login.htm. Using "Zope Real Basic-Auth" the login simply fails.


Is there a simple example on how to setup a sub-site with a PAU and to 
allow login to a principal from this PAU.


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Concurrent data access in Zope

2006-04-11 Thread Achim Domma

Hi,

I have a questions about concurrency, which came up during switching my 
head from realtional databases to ZODB:


I think about implementing a container-like data object which holds 
other data objects. To speed up access to the child objects I would 
implement some indexes using persistent btrees, which are managed and 
stored by the container object.


How is access synchronisation to such a structure handled in Zope? What 
happens automatically? What do I have to do on my own?


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] understanding security

2006-04-07 Thread Achim Domma

Frank Burkhardt wrote:

Do I understand it right, that I do not grant a permission to a principal on a certain 
object instance? I only grant a permission to use a certain interface!?



You can either grant permissions to principals (or groups/roles) globally. 
Those permissions
can be used in multiple ways:
   * To protect Views. You can only access views you have permissions for (e.g. 
 )
   * To protect attributes/methods of classes (*not objects*) ()
   * To define, who is allowed to modify certain attributes ( )


I can follow to this point. That's how I understand Zope security until now.


Additionally you may grant permissions (and role memberships) on a per object 
(*not per class*)
basis ( using e.g. the grant.html-View) which effects only a single object.


That's what I was looking for, but don't know how to do. For I example:

I want to let a user create an object (i.e. a message in a message 
board). All users with a certain role (i.e. Admins) should be able to 
edit the new object, but the creating user should also be able to edit 
it. So I have to give him the persmission to edit.


How can I do something like that?

regards,
Achim

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] understanding security

2006-04-07 Thread Achim Domma

Hi,

I'm just learning Zope and have a question regarding the security model:

Do I understand it right, that I do not grant a permission to a 
principal on a certain object instance? I only grant a permission to use 
a certain interface!?


regards,
Achim
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users