Re: [Zope3-Users] PAU / credentials / authentication

2007-09-06 Thread Rupert Redington
Hermann Himmelbauer wrote: Hi, After thoroughly studying Philipp's book and the PAU-doctests, I unfortunately still have no clue how to do my authentication. My (simple) scenario is the following: - I wrote a Zope package that can be added as a site - I have one Zope instance with

Re: AW: [Zope3-Users] PAU / credentials / authentication

2007-09-06 Thread Rupert Redington
Roger Ineichen wrote: Hi An: Hermann Himmelbauer Cc: zope3-users@zope.org Betreff: Re: [Zope3-Users] PAU / credentials / authentication [...] # My event subscriber will be passed a reference to the site object # from which we can get the sitemanager sitemanager =

Re: [Zope3-Users] Default Skins for certain sites - how?

2007-06-21 Thread Rupert Redington
Hi Hermann, I do this by registering a subscriber for zope.app.publication.interfaces.IBeforeTraverseEvent: subscriber handler=.handlers.skinTraverseSubscriber for=zope.app.publication.interfaces.IBeforeTraverseEvent / the handler sets the skin: (note that my site objects have a

Re: [Zope3-Users] Re: Evolution of ZoDB after changing python modules structure (moving content classes to another module)

2007-06-12 Thread Rupert Redington
Aleksander Kowalczyk wrote: On 6/8/07, Alek Kowalczyk [EMAIL PROTECTED] wrote: Alek Kowalczyk [EMAIL PROTECTED] writes: Hi, I moved my content class from mypackage.mymodule.MyContentClass into mypackage.mysubpackage.mymodule.MyContentClass. But when started Zope and went to visit an

Re: [Zope3-Users] Wrong contained type - why?

2007-05-02 Thread Rupert Redington
For me it was a problem with my vocabulary which works in this form... class ClipboardVocabFactory(object): implements(IVocabularyFactory) def __call__(self, context): terms = [(x.title, x) for x in \ Session().query(ArchiveObject).select()] voc =

Re: [Zope3-Users] Wrong contained type - why?

2007-04-26 Thread Rupert Redington
Hermann Himmelbauer wrote: Hi, As already mentioned before, I use interfaces that contain lists of other interfaces via the following syntax: emails = List(value_type=Object(schema=IEmail)) In my formlib-based class, I have use the following, so that the widgets are displayed

Re: [Zope3-Users] Re: UnicodeEncodeErrors from zope/app/maildir.py

2006-11-29 Thread Rupert Redington
Raphael Ritz wrote: Well, there are the officials like: http://unicode.org http://en.wikipedia.org/wiki/Unicode but you want probably something more like http://www.joelonsoftware.com/articles/Unicode.html and for Python in particular I found

Re: [Zope3-Users] filter possibilities

2006-09-26 Thread Rupert Redington
I'm no expert on this... In fact I often find myself struggling to get cataloging in Zope3 to do what I want in a painless way (which is probably why hurry exists...). Experts please correct me if I'm doing anything objectionable... I'm assuming that you've got an IntIds utility and a catalog,

Re: [Zope3-Users] Access request object from content_factory

2006-06-21 Thread Rupert Redington
Hi John, When I'm looking for the request object from somewhere like that I use from zope.security.management import getInteraction request = getInteraction().participations[0] Why this works is outlined (IIRC) in zope/app/securitypolicy/zopepolicy.txt. There may well be better ways to fish

Re: [Zope3-Users] Re: Access request object from content_factory

2006-06-21 Thread Rupert Redington
Philipp von Weitershausen wrote: Marco Mariani wrote: Rupert Redington wrote: from zope.security.management import getInteraction request = getInteraction().participations[0] Why this works is outlined (IIRC) in zope/app/securitypolicy/zopepolicy.txt. There may well be better ways to fish

[Zope3-Users] Formlib and fieldsets

2006-06-21 Thread Rupert Redington
Hi All, I can't find anything in Formlib to indicate that there's a well trodden path to handling fieldsets in formlib. I'm not really sure what the best way to do this is. Clearly the formlib form templates that I can see in Zope 3.2 don't contain any code for handling fieldsets - but that

Re: [Zope3-Users] Re: Access request object from content_factory

2006-06-21 Thread Rupert Redington
John Smith wrote: --- Rupert Redington [EMAIL PROTECTED] wrote: I realise that I shouldn't use zapi anymore... apart Good gracious! No zapi? How did I miss that? Where do I get my utilities, parents, roots, adapters from now? John. (dazed and confused) I think

Re: [Zope3-Users] Create RSS feed

2006-06-01 Thread Rupert Redington
Tarek Ziadé wrote: Achim Domma wrote: 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

Re: [Zope3-Users] Grants to unathenticatedPrincipal[Resolved]

2006-03-20 Thread Rupert Redington
Frank Burkhardt wrote: Hi, On Sat, Mar 18, 2006 at 10:32:39AM +, Rupert Redington wrote: When I try to make a permission or role based grant to zope.anybody through zcml I fail with: File /home/rupert/Zope3/lib/python/zope/app/security/principal.py, line 50, in checkPrincipal

[Zope3-Users] Grants to unathenticatedPrincipal

2006-03-18 Thread Rupert Redington
When I try to make a permission or role based grant to zope.anybody through zcml I fail with: File /home/rupert/Zope3/lib/python/zope/app/security/principal.py, line 50, in checkPrincipal raise ValueError(Undefined principal id, principal_id)

Re: [Zope3-Users] Problem with the Zope3 book Example (Can't Browse Interface in Zope 3.2)

2006-02-27 Thread Rupert Redington
Siddhartha Azad wrote: Hi all, I recently bought the Web component Devlopment with Zope3 book and downloaded the worldcookery example. I tried to deploy the example (chapter 5) into my Zope 3.2 instance and restarted it. The book says that I should click on Manage Site and go to Site

Re: [Zope3-Users] Trying to use browser:form - 404

2006-02-10 Thread Rupert Redington
Florian Lindner wrote: Am Freitag, 10. Februar 2006 15:18 schrieb Garanin Michael: I simulate this for Buddy from buddydemo (see attached) == it is normal work for Buddy-object! I think you make mistakes: 1) __init__ for 'view' always get 3-parameters (self, context, request) I've removed

Re: [Zope3-Users] Trying to use browser:form - 404

2006-02-10 Thread Rupert Redington
Florian Lindner wrote: Also specifying an interface and calling the view from an object implementing this interface does not make it work. FYI - Florian, it appears we're doing something very similar - mines a signup/registration form too! Do you intend to submit the form data to a

[Zope3-Users] Javascript and custom widgets

2006-02-09 Thread Rupert Redington
I'm missing something... again... I've started writing some widgets for my current project, some of which will make use of some javascript. I'd like to load a script in the head of the page when such a widget is being used (so that a window.onload function can parse the dom tree and apply the

Re: [Zope3-Users] Best way to add a Principal to PAU

2006-02-07 Thread Rupert Redington
Florian Lindner wrote: Am Sonntag, 5. Februar 2006 22:37 schrieb Stephan Richter: On Sunday 05 February 2006 12:34, Florian Lindner wrote: I've managed to add a principal to a principal folder inside a PAU: pau = getUtility(IAuthentication) pfolder = pau.keys()[0] principal =

[Zope3-Users] Forbidden Attribute errors whilst adapting to schema

2006-02-03 Thread Rupert Redington
Morning (if it is for you)... I've been trying to write an adapter which stores data submitted by a schema generated form into the annotations on an object. I've been guided in this by both Stephan's and Philipp's books (though neither provide an example of what I'm trying to do). My unit tests

Re: [Zope3-Users] Forbidden Attribute errors whilst adapting to schema

2006-02-03 Thread Rupert Redington
Dominik Huber wrote: Rupert Redington wrote: adapter for=.interfaces.ILink provides=.interfaces.ILinkDetails factory=.link.LinkDetails trusted=True / if you use trusted adapters you have to declare an additional class or content directive for the adapter

Re: [Zope3-Users] Forbidden Attribute errors whilst adapting to schema

2006-02-03 Thread Rupert Redington
Dominik Huber wrote: I prefer the trusted adapter because they encapslulate the adapter inside a security proxy. Then the trusted adapter has full access to the underlying object. That simplifies the security story very much because you handle it on the adation level. If you use locatable