[Zope3-Users] View with template

2005-10-28 Thread Frank Burkhardt
Hi, a short introduction first: I'm Frank Burkhardt, working at the Max Planck Institute in Germany. My employer wants a new website to replace the old one (www.cbs.mpg.de - yes, it looks really really ugly). We chose Zope3 to implement it. Maybe there will be one or two questions on th

Re: [Zope3-Users] View with template

2005-11-02 Thread Frank Burkhardt
Hi, On Mon, Oct 31, 2005 at 08:51:58AM +0100, Dominik Huber wrote: [snip] > >How can Zope be forced to use the template instead of __call__ing > >the TestView-Object? > > > > > If you use the the browser:form, browser:edit and/or browser:add > directive your TestView will be mixed in automatic

[Zope3-Users] Sourcetext-mux

2005-11-09 Thread Frank Burkhardt
Hi, I found a code fragment in an example-application which enables a View-Object to render a SourceText using a renderer of the user's choice. class ViewClass(object): def render(self): entry_text = zapi.createObject(None, self.context.renderer,

[Zope3-Users] Catalog for newbies

2005-12-06 Thread Frank Burkhardt
Hi, after adding a "Unique Id utility", "Catalog" and some field + text indices I successfully added documents which seem to be added to the catalog (as shown in the catalog's "Advanced"-tab). However I've got two question now: 1. How do I search the catalog? 2. Documents are added to the index

Re: [Zope3-Users] Catalog for newbies

2005-12-08 Thread Frank Burkhardt
Hi, On Tue, Dec 06, 2005 at 10:41:02AM -0700, Jeff Shell wrote: [snip] > > 1. How do I search the catalog? [snip] > catalog = zapi.getUtility(ICatalog, 'catalog', self.context) > results = self._results = catalog.searchResults(textindexname='text to > search for', fieldindexname=('low value',

[Zope3-Users] The page that you are trying to access...

2005-12-08 Thread Frank Burkhardt
Hi, When I request a non-existing page from a zope3-server, I get this message: The page that you are trying to access is not available Please note the following: 1. You might have misspelled the url 2. You might be trying to access a non-existing page How can this page b

Re: [Zope3-Users] The page that you are trying to access...

2005-12-12 Thread Frank Burkhardt
On Thu, Dec 08, 2005 at 05:45:08PM +0100, Dominik Huber wrote: > Frank Burkhardt wrote: > > >Hi, > > > >When I request a non-existing page from a zope3-server, > >I get this message: > > > > The page that you are trying to access is not available >

Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html

2005-12-13 Thread Frank Burkhardt
Hi, On Tue, Dec 13, 2005 at 02:02:05PM +0100, Andreas Elvers wrote: > Hi all, > > what the rationale of @@ anyway ? I've searched for a definition for > this in the Developer Handbook and elsewhere but it's hard to search > for @@ and view. (To all Gurus: Please correct me, if I'm wrong) @@ mar

[Zope3-Users] Permissions of a given object

2005-12-14 Thread Frank Burkhardt
Hi, when I search using a catalog, I get a list of persistent objects but maybe there are objects among them, the calling user doesn't have permissions for. How do I check, if the current user (the one calling the view which queries the catalog) is allowed to view an object? How do I change perm

Re: [Zope3-Users] error on start

2005-12-15 Thread Frank Burkhardt
Hi, On Wed, Dec 14, 2005 at 05:39:45PM -0500, Stephan Richter wrote: > Hi Peter, > > sorry for the long delay, but I am just now catching up with the mails. Since > you have silent for so long, I assume you figured out the problem? Personally > I do not understand at all how this failure could

[Zope3-Users] TextIndexNG3 and Zope3

2005-12-29 Thread Frank Burkhardt
Hi, currently I'm trying to use TextIndexNG3 in Zope3. I'm able to add a "Ting3 Index" to my catalog but there are some problems: 1. After I added a single object, the catalog statistic (Advanced-Tab) shows a table like this: index | document count | word count --+

Re: [Zope3-Users] Permissions of a given object

2006-01-12 Thread Frank Burkhardt
Hi, On Thu, Dec 15, 2005 at 10:27:00AM +0100, Dominik Huber wrote: > Frank Burkhardt wrote: > > >Hi, > > > >when I search using a catalog, I get a list of persistent objects > >but maybe there are objects among them, the calling user > >doesn't have permi

Re: [Zope3-Users] Permissions of a given object

2006-01-12 Thread Frank Burkhardt
Hi, On Thu, Jan 12, 2006 at 07:19:02AM -0500, Stephan Richter wrote: [snip] > > But canAccess never fails here - even if the object is inaccessible. > > canAccess() returns a boolean unless there is no security declaration at all. I changed the code fragement to for obj in catalog.searchResu

Re: [Zope3-Users] Permissions of a given object

2006-01-17 Thread Frank Burkhardt
Hi, On Sun, Jan 15, 2006 at 11:20:47AM -0500, Stephan Richter wrote: > On Thursday 12 January 2006 08:13, Frank Burkhardt wrote: > > but the problem remains: canAccess returns True for all inaccessible > > objects. > > It is hard to guess where your setup is wrong. Does

Re: [Zope3-Users] Permissions of a given object

2006-01-17 Thread Frank Burkhardt
Hi, On Tue, Jan 17, 2006 at 10:53:12AM -0500, Gary Poster wrote: [snip] > The meaning of "objects a user can access" varies significantly from > application to application. You will probably want to optimize this > filter by creating an index eventually. For some policies and questions, > this

[Zope3-Users] test() in TALES in Zope3

2006-02-01 Thread Frank Burkhardt
Hi, in Zope2 there's a test() method that can be used in TAL (*). Is there something comparable in Zope3? I know how to write such a method but how to make it available in the namespace of TALES-"python:"-expressions? I would like to write expressions like this: Is this possible? Regards, Fr

Re: [Zope3-Users] test() in TALES in Zope3

2006-02-01 Thread Frank Burkhardt
On Wed, Feb 01, 2006 at 09:04:36AM +0100, Frank Burkhardt wrote: [snip] > /> > > Is this possible? Impressing simple solution :-) . Thank you Andreas and Igor. Frank ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope

[Zope3-Users] Lists dont accept default values

2006-02-15 Thread Frank Burkhardt
Hi, I wrote a schema like this to have a list of objects on a content object: class IMyContent(Interface): mynumbers=List( title=_(u"Cool Numbers"), required=True, value_type=Int( title=_("integer") ) default=[1,2,3,5,7] ) myline=TextLine(

Re: [Zope3-Users] Lists dont accept default values

2006-02-16 Thread Frank Burkhardt
Hi, On Wed, Feb 15, 2006 at 06:18:48PM +0100, Florian Lindner wrote: [snip] > > I wrote a schema like this to have a list of objects on a content object: > > > > class IMyContent(Interface): > > mynumbers=List( > >title=_(u"Cool Numbers"), > >required=True, > >value_

[Zope3-Users] Accessing an attribute of 'context'

2006-02-20 Thread Frank Burkhardt
Hi, How can I access an attribute of a BrowserView's context if the attribute's name is not hardcoded? Example: Works: self.context.myattribute Works: removeSecurityProxy(self.context).__getattribute__('myattribute') What I want to do: Doesn't work: self.context.__getattribute__('myattri

[Zope3-Users] Creating XML using Pagetemplates doesn't work

2006-03-01 Thread Frank Burkhardt
Hi, I wrote a view that returns a Atom-document (comparable to RSS). The content type is 'application/atom+xml'. Unfortunately the pagetemplate inserts some strings containing german umlauts (non-ascii) and I get this error: ValueError: Unicode results must have a text content type. I found this

Re: [Zope3-Users] How to create/remove content objects in Application Code

2006-03-02 Thread Frank Burkhardt
Hi, On Thu, Mar 02, 2006 at 09:03:25AM +, Reinhold Strobl wrote: > Hi, > > i am searching for a possibility to create and remove content objects in > Python > Code. > Thanks for replies, [EMAIL PROTECTED] > bin/zopectl debug # creating folder... >>> root=debugger.root() >>> from zope.app.

[Zope3-Users] Problem with XHTML in Pagetemplates

2006-03-03 Thread Frank Burkhardt
Hi, I try to create XHTML documents from Pagetemplates but unfortunately tags are not always closed correctly. Example: is Rewritten to which invalids the entire page. How can I enforce correctly closed Tags? Regards, Frank ___ Zope3-users

Re: [Zope3-Users] Problem with XHTML in Pagetemplates

2006-03-06 Thread Frank Burkhardt
Hi, On Fri, Mar 03, 2006 at 11:35:58PM +, Peter Bengtsson wrote: > > On 3 Mar 2006, at 14:08, Frank Burkhardt wrote: > > >Hi, > > > >I try to create XHTML documents from Pagetemplates but unfortunately > >tags are not always closed correctly. Example

Re: [Zope3-Users] Accessing sub objects view class?

2006-03-16 Thread Frank Burkhardt
On Wed, Mar 15, 2006 at 10:22:02AM -0800, Mats Nordgren wrote: > I'm trying to figure out how to access a sub objects view class. > > > > 1. > > 2. Title > > 3. Description > > 4. > > 5. > > 6. > > 7. /> > > 8. tal:content="item/description" /> > > 9.

[Zope3-Users] Check permissions

2006-03-17 Thread Frank Burkhardt
Hi, how can I test, if the current principal (e.g. by being member in a special group) has a given permission on a given content object? Maybe something like this: if 'zope.ManageContent' in self.context.permissions(): """...""" This should include all permission defined in ZCML *and* all

Re: [Zope3-Users] skin concepts

2006-03-17 Thread Frank Burkhardt
Hi, On Fri, Mar 17, 2006 at 08:52:26AM +0100, Lorenzo Gil Sanchez wrote: > I want to understand some concepts involved in skin development and I > haven't found any resource to read about this. I noticed that there is > no skin package inside the Zope codebase and so I couldn't find any > README.

Re: [Zope3-Users] Grants to unathenticatedPrincipal

2006-03-20 Thread Frank Burkhardt
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 > raise ValueError("Un

[Zope3-Users] Vocabularies and Zope3-svn

2006-03-21 Thread Frank Burkhardt
Hi, I've got some simple vocabularies like this one: [vocabularies.py] class RedirectTargetTypes(SimpleVocabulary): def __init__(self,context): targettypes={ 'generic url':_(u"Arbitrary URL"), 'local uid':_(u"Local UID or Permalink"), 'local url':_(u"Local URL

Re: [Zope3-Users] Vocabularies and Zope3-svn

2006-03-21 Thread Frank Burkhardt
Hi, On Tue, Mar 21, 2006 at 07:49:21AM -0500, Stephan Richter wrote: > On Tuesday 21 March 2006 07:34, Frank Burkhardt wrote: > > I tried some hours modifying the "RedirectTargetTypes" class with > > implements and classProvides but it didn't work. How am I

[Zope3-Users] How to list all utilities providing given interface

2006-03-28 Thread Frank Burkhardt
Hi, how do I get a list of the names of all utilities providing a given interface? Regards, Frank ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users

[Zope3-Users] editform onSuccess-method

2006-03-29 Thread Frank Burkhardt
Hi, I need to do some changes to an object, after it's either created or modifed. Is there a chance to define methods on the object's class that are called after the addform or the editform are done creating/changing the object? Maybe there's a ZCML-way to do this? Regards, Frank ___

Re: [Zope3-Users] editform onSuccess-method

2006-03-29 Thread Frank Burkhardt
On Wed, Mar 29, 2006 at 04:12:40PM +0530, baiju m wrote: > On 3/29/06, Frank Burkhardt <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I need to do some changes to an object, after it's either created or > > modifed. Is there a chance to define methods on the ob

[Zope3-Users] principalfolder breaks manager

2006-03-30 Thread Frank Burkhardt
Hi, after adding a principal folder, the manager principal is no longer valid. That's bad, because I'm unable to remove the principal folder again (at least without pdb or 'zopectl debug'). Is there a special reason for that behaviour or do i miss something (like: "you have to install utility XY

[Zope3-Users] Tales slot-fill'ing order

2006-04-03 Thread Frank Burkhardt
Hi, one of my objects has to add a list of keywords as -tag to the html-. The keyword list is dynamically created during fill-slot of the body. The template looks like this: The tales namespace-adapter 'mpgsite' is responsible for maintining a l

[Zope3-Users] Adapting multiple times

2006-04-04 Thread Frank Burkhardt
Hi, I've got objects implementing interface IMyObject and two adapters: IMyObject -> ISearchable ISearchable -> ISearchableEN I would like to use a TextIndex to do fulltext search on objects implementing ISearchableEN . Unfortunately this doesn't work. The TextIndex tries something like th

Re: [Zope3-Users] Adapting multiple times

2006-04-05 Thread Frank Burkhardt
Hi, On Wed, Apr 05, 2006 at 08:59:19AM +0200, Michael Howitz wrote: > Am Mittwoch, den 05.04.2006, 08:48 +0200 schrieb Frank Burkhardt: > > Hi, > > > > I've got objects implementing interface > > > > IMyObject > > > > and two adapters: &

Re: [Zope3-Users] understanding security

2006-04-07 Thread Frank Burkhardt
Hi, On Fri, Apr 07, 2006 at 03:33:28PM +0200, Achim Domma wrote: > 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

Re: [Zope3-Users] Beyond ICatalog.searchResults

2006-04-13 Thread Frank Burkhardt
Hi, On Thu, Apr 13, 2006 at 04:27:15PM +0330, Mohsen Moeeni wrote: > Hi; > > Looking at ICatalog interface, I could not figure out > how can I request some simple and common operations > from my catalog. You don't really have to cope with the catalog but with your indexes only. The catalog's job

Re: [Zope3-Users] dynamic file creation

2006-04-14 Thread Frank Burkhardt
Hi, On Fri, Apr 14, 2006 at 02:56:55PM +0200, Michal Nowikowski wrote: > Hello, > > I'm a Zope3 newbie. I want to send to user a file while he clicks on a link. > The file is created dynamically and sent to user for example in ZIP format. > I think I had to use IFile interface and File class. But

Re: [Zope3-Users] Referencing objects in auto-generated forms

2006-04-15 Thread Frank Burkhardt
Hi, On Sat, Apr 15, 2006 at 08:41:57AM -0700, Ruben Gutierrez wrote: > I'm having trouble understanding some of the semantics or conventions with > Zope. One simple question I have is how do I create a list of selectable > values in a form. I understand you can use a Choice object, but I would lik

Re: [Zope3-Users] Re: Referencing objects in auto-generated forms

2006-04-18 Thread Frank Burkhardt
Hi,. On Sun, Apr 16, 2006 at 01:48:37PM -0500, Jeff Rush wrote: [snip] > Frank, I thought vocabularies were being de-emphasized though, in favor of > the newer 'sources' component? > Vocabularies were good for short lists of choices, but because it read them > all into memory at once not so

[Zope3-Users] Sending data to widgets

2006-04-18 Thread Frank Burkhardt
Hi, I need to send some data from a view class to all widgets that are used in the form. Unfortunately some of the widget that need to receive those data are contained e.g. in lists or dictionaries. I tried to do somthing like this: request._data=somedata My view class would add 'somedata' to

Re: [Zope3-Users] Re: Sending data to widgets

2006-04-18 Thread Frank Burkhardt
Hi, On Tue, Apr 18, 2006 at 03:20:49PM +0200, Philipp von Weitershausen wrote: [snip] > Right. Requests are read-only to the application. > > > It there a chance to transport data throught the request object > > without modifying the depth of the zope core? > > > > Maybe there's a way for widg

[Zope3-Users] Object modified or not

2006-04-18 Thread Frank Burkhardt
Hi, how does Zope decide, if a persistent object is modified? What I'm interested in: Does myobject._foo='bar' delattr(myobject,'_foo') make Zope create a new version of the 'myobject' in zodb? Regards, Frank ___ Zope3-users mailing list Zo

Re: [Zope3-Users] Re: Sending data to widgets

2006-04-18 Thread Frank Burkhardt
Hi, On Tue, Apr 18, 2006 at 04:04:43PM +0200, Philipp von Weitershausen wrote: > Hi Frank, > > > My problem is not about data the widget should display but about data > > that controls the widget's behaviour. > > > > In this case my form consists of some widgets representing a schema > > interf

Re: [Zope3-Users] Is authenticated user in TAL?

2006-04-18 Thread Frank Burkhardt
On Tue, Apr 18, 2006 at 06:11:41PM +0200, Florian Lindner wrote: > Hello, > how can I find out if a user is authenticated with TAL? (not zope.anybody) > > I've tried: > > tal:condition="not: exists: request/principal/getLogin" > > but that does not work reliable. That's my way: tal:condition="

Re: [Zope3-Users] Re: Sending data to widgets

2006-04-18 Thread Frank Burkhardt
On Tue, Apr 18, 2006 at 10:28:38AM -0400, Gary Poster wrote: [snip] > >Perhaps it's overkill to write adapter for all my content objects. I think > >I found a solution. The Request object might be RO but I can smuggle an > >object > >reference inside the reponse headers and removed it after all

Re: [Zope3-Users] Security Question

2006-04-23 Thread Frank Burkhardt
Hi, On Sat, Apr 22, 2006 at 05:06:15PM -0500, Jachin Rupe wrote: > hi there > > Is there a good example out there of setting up security based on some > sort of ownership system? > > I'm working my way though the Zope book. What I would like to be able to > do is allow the User who created a me

Re: [Zope3-Users] newbie question on i18n

2006-04-26 Thread Frank Burkhardt
Hi, On Wed, Apr 26, 2006 at 11:14:19AM +0200, Riccardo Tonon wrote: > Hi everybody, > > I'm developing a multilanguage site in Zope 3. > > I've just prepared it to support the i18n based on the browser language. > > I would like also to let the user decide which language to use. (e.g. using a

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

2006-04-28 Thread Frank Burkhardt
Hi, On Fri, Apr 28, 2006 at 02:29:51PM +0200, Achim Domma wrote: > 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. I'm curious: How are you going to do this (compari

[Zope3-Users] PAU doesn't like Manager

2006-05-09 Thread Frank Burkhardt
Hi, I'm currently trying to use PAU. It seems to work fine but when I try to login as 'manager' as defined via ZCML, it doesn't work. Now I'm going to write a second plugin which will check the credentials of the manager. It will return a PrincipalInfo with id="pau.manager" . Michael Howitz sugg

Re: [Zope3-Users] Searching and Indexing in Zope3

2006-05-09 Thread Frank Burkhardt
Hi, On Tue, May 09, 2006 at 10:32:45AM -0500, Sreeram Raghav wrote: > Hi Frank, > Thanks for the Zope3 Indexing and Searching HOWTO > I translated your page to english and was trying to work it out. > Here's exactly what i did: > > 1. Logged into zope3 manager > 2. went to "++etc++site/default/"

Re: [Zope3-Users] Indexing PDF files

2006-05-10 Thread Frank Burkhardt
Hi, On Wed, May 10, 2006 at 03:29:34PM -0500, Sreeram Raghav wrote: [snip] > Initially the only files being indexed were "ZPT pages", but after writing > the adapter even text files were being indexed. > However the problem is that when I try to add a PDF of Word documents, the > files are not b

Re: [Zope3-Users] sequence of custom widgets

2006-05-12 Thread Frank Burkhardt
Hi, On Fri, May 12, 2006 at 10:48:52AM +0200, Marco Mariani wrote: > > I've got a form which contains an object widget given by > CustomWidgetFactory(ObjectWidget, MyClass) > > Now, how can I render a Sequence widget to store a list of MyClass > instances? some months ago, Phillip von Weitersha

Re: [Zope3-Users] How to make catalog working?

2006-05-16 Thread Frank Burkhardt
Hi, On Mon, May 15, 2006 at 11:16:09PM +0200, Florian Lindner wrote: > Hello, > I've added some content objects of interface IFoo to my site. > Then I added a catalog to my site (and also a IntID utility). I registered > both. To the catalog I've added a FieldIndex and a TextIndex, set the > int

Re: [Zope3-Users] How to make catalog working?

2006-05-16 Thread Frank Burkhardt
Hi, On Tue, May 16, 2006 at 07:08:34PM +0200, Florian Lindner wrote: > Am Dienstag, 16. Mai 2006 12:02 schrieb Frank Burkhardt: [snip] > > The IntID utility has to be registered *before* all the objects you > > want to find. No object created before you had a registered IntID &

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

2006-05-17 Thread Frank Burkhardt
Hi, On Wed, May 17, 2006 at 09:15:22AM +, Reinhold Strobl wrote: [snip] > Thanks for your reply, but I have looked on ZEO - however: this technology > only > allows a seperation of application from the concrete storage. But what I am > looking for is I want to seperate the application tier

Re: [Zope3-Users] zope.schema.Object and custom widgets in formlib

2006-05-19 Thread Frank Burkhardt
Hi, On Thu, May 18, 2006 at 12:34:06PM -0500, Jachin Rupe wrote: > hi there > > I am having trouble getting form's generated for zope.schema.Object. After > doing some more > reading it looks like I should be using formlib instead of > zope.app.form.browser.add.AddView and > zope.app.form.br

Re: [Zope3-Users] zope.schema.Object and custom widgets in formlib

2006-05-19 Thread Frank Burkhardt
Hi, On Thu, May 18, 2006 at 12:34:06PM -0500, Jachin Rupe wrote: > hi there > > I am having trouble getting form's generated for zope.schema.Object. After > doing some more > reading it looks like I should be using formlib instead of > zope.app.form.browser.add.AddView and > zope.app.form.br

[Zope3-Users] Deleting subobjects works "half" only

2006-05-19 Thread Frank Burkhardt
Hi, I've got a strange effect here. A view on an object of mine has to remove all the objects childs: class MyView(BrowserView): def __call__(self): for entry in self.context.keys(): del self.context[entry] return '' Unfortunately, the view removes just half the objects -

Re: [Zope3-Users] Deleting subobjects works "half" only

2006-05-19 Thread Frank Burkhardt
Hi, On Fri, May 19, 2006 at 07:56:24AM -0400, Stephan Richter wrote: > On Friday 19 May 2006 07:47, Frank Burkhardt wrote: > > Unfortunately, the view removes just half the objects - independently of > > how much objects are left inside the container. > > That is the cor

Re: [Zope3-Users] zope.schema.Object and custom widgets in formlib

2006-05-19 Thread Frank Burkhardt
Hi, On Fri, May 19, 2006 at 11:37:51AM -0500, Jachin Rupe wrote: [snip] > I still haven't gotten it working yet though. I'm going to keep trying to > figure out what > the problem is, I think I see what your basic strategy is. > > However there are a few error I found in your example you may

Re: [Zope3-Users] zope.schema.Object and custom widgets in formlib

2006-05-22 Thread Frank Burkhardt
Hi, On Fri, May 19, 2006 at 02:21:23PM -0500, Jachin Rupe wrote: [snip] > I'm still getting a "ComponentLookupError". I'll just include the example > I'm trying to make work > at the bottom, it's pretty short. I'm beginning to think there may be > something in your > explication that I nee

Re: [Zope3-Users] Deleting subobjects works "half" only

2006-05-22 Thread Frank Burkhardt
Hi, On Mon, May 22, 2006 at 11:43:46AM +0100, Chris Withers wrote: > Stephan Richter wrote: > >for entry in tuple(tree.keys()) the tuple(...)-thing works. > >for entry in tree.iterkeys() This doesn't work because the IContainer-interface doesn't cover it so I don't have any permission - even as

Re: [Zope3-Users] zope.schema.Object and custom widgets in formlib

2006-05-23 Thread Frank Burkhardt
Hi, On Mon, May 22, 2006 at 09:59:09AM -0500, Jachin Rupe wrote: [snip] > I am getting a "ForbiddenAttribute" error. I can run the addform with out > any errors but if I editform the "street" > field is blank (even though I added some text to it when I added it). Then > if I makes some chan

Re: [Zope3-Users] zope.schema.Object and custom widgets in formlib

2006-05-24 Thread Frank Burkhardt
Hi, On Tue, May 23, 2006 at 11:21:54AM -0500, Jachin Rupe wrote: > > On May 23, 2006, at 5:33 AM, Frank Burkhardt wrote: > > [snip] > > > > >> > >> > >> [snip] Try removing th

Re: [Zope3-Users] Create complex object

2006-05-25 Thread Frank Burkhardt
On Thu, May 25, 2006 at 02:45:04AM +0200, Achim Domma wrote: [snip] Just create another interface: > class IWorkspace(Interface): > title = TextLine( >title=u"Title", >description=u"The title", >default=u"proCoders Workspace", >required=True) > projects =

[Zope3-Users] How to manually define an object's provided interfaces?

2006-05-29 Thread Frank Burkhardt
Hi, I'm going to write an alternative implementation of zope.app.file.interfaces.IFile . This implementation will automatically determine the mime type of the data it's containing. I would like to add a method that determines (guesses), if the current file object contains an image... isimage=(m

Re: [Zope3-Users] How to manually define an object's provided interfaces?

2006-05-29 Thread Frank Burkhardt
Hi, On Mon, May 29, 2006 at 01:31:03PM +0200, Lennart Regebro wrote: > On 5/29/06, Frank Burkhardt <[EMAIL PROTECTED]> wrote: > >I'm going to write an alternative implementation of > >zope.app.file.interfaces.IFile . This implementation will automatically > >det

Re: [Zope3-Users] Re: How to manually define an object's provided interfaces?

2006-05-29 Thread Frank Burkhardt
Hi, On Mon, May 29, 2006 at 02:50:02PM +0200, j.kartnaller wrote: > Have a look at zope.interface.__init__.py -> alsoProvides That's it - it's working :-) . Thank you, Frank ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailma

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

2006-05-29 Thread Frank Burkhardt
Hi, On Mon, May 29, 2006 at 08:26:38PM +0200, Achim Domma wrote: > Hi, > > I have implemented ArticleFolder and Article like this: > > > class Article(Persistent,Contained): > implements(IArticle) > title=u'' > body=u'' > > class ArticleFolder(Folder): > implements(IArticleFold

[Zope3-Users] Two object revisions and a simple workflow

2006-06-02 Thread Frank Burkhardt
Hi, we are going to implement a simple workflow here. Example of our use case: * There are containers 'IArticleFolder' containing objects (e.g. IArticle) * Those objects sometimes contain subobjects (e.g. IImage, IFile) * When an object or one of it's subobjects is modified, it enters a

Re: [Zope3-Users] Re: I fold. What are ++etc++ and ++resource++ etc?

2006-06-13 Thread Frank Burkhardt
Hi, On Mon, Jun 12, 2006 at 01:19:26PM +0200, Lennart Regebro wrote: [snip] > We need a Zope3 FAQ where things like this can be put, because the [snip] There already is one (in german): http://zope3.mpg.de/cgi-bin/twiki/view/Zope/PlusPlus http://zope3.mpg.de/cgi-bin/twiki/view/Zope/AtAt Re

[Zope3-Users] Trusted adapters and annotated security

2006-06-14 Thread Frank Burkhardt
Hi, Is there a general way make an adapter 'inherit' annotated security permissions from the object it adapted? Some more information: I've got an adapter IMyInterface->IAnnotatable. It's registered like this: Usually no user has 'zope.ManageContent' permission on an

[Zope3-Users] Assigning roles to principals

2006-06-14 Thread Frank Burkhardt
Hi, I implemented a small IAuthenticatorPlugin which manages a list of principals. Those principals dont seem to have any global permissions. I zcml-registered a role and a permission ( both are named 'mpgsite.Authenticated' ) and would like all of my principals the role to be assigned to. I trie

Re: [Zope3-Users] Dict Widget

2006-06-14 Thread Frank Burkhardt
Hi, On Wed, Jun 14, 2006 at 12:39:34PM -0500, mats.nordgren wrote: > I'm totally clueless as how to get a dict widget to work. > > class IMyObject(Interface): > mydict = Dict( > title=u'My Dict', > key_type=TextLine(), > value_type=Int()) > > I see in zope.app.form.browser the conf

Re: [Zope3-Users] Assigning roles to principals

2006-06-14 Thread Frank Burkhardt
Hi, On Wed, Jun 14, 2006 at 09:35:47AM -0500, mats.nordgren wrote: > Frank, > > Try this: > > role_map = IPrincipalRoleManager(context) <== For example root of site. > role_map.assignRoleToPrincipal(u'mpgsite.Authenticated', principal_id) Thank you - It's working :-) Regards, Frank __

Re: [Zope3-Users] Dict Widget

2006-06-15 Thread Frank Burkhardt
Hi, On Wed, Jun 14, 2006 at 02:41:05PM -0500, mats.nordgren wrote: > Frank, > > That would be great. If you wish you can email it to me. > > This should be included in the trunk IMHO. > > Thanks, I attached the widgets, zcml-statements to configure them and modified Dict-implementation. Good

Re: [Zope3-Users] Trusted adapters and annotated security

2006-06-15 Thread Frank Burkhardt
Hi, On Wed, Jun 14, 2006 at 01:24:14PM +0200, Frank Burkhardt wrote: > Hi, > > Is there a general way make an adapter 'inherit' annotated security > permissions > from the object it adapted? I've found the solution. This stateme

Re: [Zope3-Users] Using restructered text

2006-06-19 Thread Frank Burkhardt
On Thu, Jun 15, 2006 at 10:08:38PM +0200, Florian Lindner wrote: > Hello, > how can I use (render to html) restructered text that is in a static file? This might help (untested, I like Twiki-Source better :-) ): rest=zapi.createObject(None,'zope.source.rest',my_restrucuted_textstring) view=getMul

Re: Re : Re : [Zope3-Users] Uploading files

2006-06-20 Thread Frank Burkhardt
Hi, On Tue, Jun 20, 2006 at 10:10:52AM +, Stéphane Brault wrote: > Hi all, > I'm sorry to bother you with what must be a simple problem but I still can't > see > how to upload files with zope 3. If ajax is not a good way to go, how should > I go ? > I just need that to upload csv files wh

Re: [Zope3-Users] Expression not working in Zope3

2006-06-23 Thread Frank Burkhardt
Hi, On Thu, Jun 22, 2006 at 11:27:45PM -0400, Daniel Roberson wrote: > OK, I added a Folder and called it MyFolder in the ZMI and then gave to > folder a title called > "Some Cool Title". > Then I created a ZPT page in the folder and enter some html and tal script as > directed in the > Zope 3

[Zope3-Users] I18N question

2006-06-27 Thread Frank Burkhardt
Hi, I need a vocabulary that presents i18n'd entries to the user. That's not a problem, when only static data is used: from zope.app.i18n import MessageFactory _=MessageFactory('mpgsite') class MyVocabulary(SimpleVocabulary) def __init__(self): data={ 'foo':_(u'nice Foo'),

[Zope3-Users] Updating just a single object

2006-06-28 Thread Frank Burkhardt
Hi, when I raise an exception in a view, no changes done to the any object are saved to zodb. I would like to change that for a single object: class MyView(BrowserView): def __call__(self): [...] if some_test: save_object(self.context) raise MyException() [

Re: [Zope3-Users] Re: Updating just a single object

2006-06-30 Thread Frank Burkhardt
Hi, On Wed, Jun 28, 2006 at 07:38:03PM +0200, Philipp von Weitershausen wrote: [snip] > You can do this by explicitly rolling back the current transaction, > modifying that single object and committing the transaction so that just > those changes will be saved. Then you raise the exception and l

Re: [Zope3-Users] Localizing Zope3 content

2006-07-07 Thread Frank Burkhardt
Hi, On Fri, Jul 07, 2006 at 03:50:02PM +0200, Thierry Florac wrote: > >From now, I looked at Localizer and other Zope2 localization products > which gave me a few ideas, but I'd really like to have as many advises > as possible about this problem and the better way it should be handled > in Zope3.

Re: [Zope3-Users] Page Template not interpreted

2006-09-06 Thread Frank Burkhardt
On Wed, Sep 06, 2006 at 11:09:03PM +0200, Sébastien VINOT wrote: > Hello, > > I'm working with Philipp Von Weitershausen's book and I get a strong result > concerning the "Customizing a > site's layout" (chapt. 8) : After setting up all the files my object receipt > displays a page which contai

Re: [Zope3-Users] Rendering subobjects in pages

2007-08-06 Thread Frank Burkhardt
Hi, On Mon, Aug 06, 2007 at 09:51:18AM -0230, Greg Baker wrote: > How can I specify a template to render a sub-object within one of my content > objects? > > For example, pretend I have a Contact object which contains a Person object. > I am rendering the Contact object through a page template

Re: [Zope3-Users] Basic question about catalogs

2007-09-03 Thread Frank Burkhardt
Hi, On Sun, Sep 02, 2007 at 11:03:47PM +0200, Tobias Kräntzer wrote: > Hello everybody, > > While figuring out catalogs in zope3 (3.3.1 on ubuntu 7.04), i ran into a > problem. I think it is just a basic configuration thing, but I could not find > what I'm doing wrong. > > In "/++etc++site/def

Re: [Zope3-Users] Modified IntId utility

2007-09-25 Thread Frank Burkhardt
Hi, On Mon, Sep 24, 2007 at 06:53:58PM +0200, Maken Seteva wrote: > Fellow Zopers. > I have made a slight modification to my intid util by inheriting from IntId > and overriding > _generateId(). > I do this to be sure that all new created objects will have an incrementing > number where > the f

Re: [Zope3-Users] How to register multiple view for the same content class

2007-09-28 Thread Frank Burkhardt
Hi, On Fri, Sep 28, 2007 at 05:33:56PM +0800, Yuan HOng wrote: > On 9/28/07, Frank Burkhardt <[EMAIL PROTECTED]> wrote: > > > > > You just need another browser:page here. Name it 'in-shelf-view' and > > use something like > > > > > >

Re: [Zope3-Users] How to register multiple view for the same content class

2007-09-28 Thread Frank Burkhardt
Hi, On Fri, Sep 28, 2007 at 03:19:10PM +0800, Yuan HOng wrote: [snip] > Is it possible to register two different views for the Book, one for > display in shelf, another for the detailed view? The one for the > detailed view is simply a BrowerPage, but how to do the book-in-shelf > view? Exactly

Re: [Zope3-Users] How to get at the URL as entered in the browser?

2007-10-24 Thread Frank Burkhardt
Hi, On Tue, Oct 23, 2007 at 11:08:35PM +0800, Yuan HOng wrote: > Hi, list, > > Is it possible to retrieve the URL the user enters in the browser > location box? The request's getURL method seems to return the > traversed URL, including the default view name. > > In particular, I have a custom tr

Re: [Zope3-Users] How to get at the URL as entered in the browser?

2007-10-26 Thread Frank Burkhardt
Hi, On Thu, Oct 25, 2007 at 08:51:41AM +0800, Yuan HOng wrote: > On 10/24/07, Frank Burkhardt <[EMAIL PROTECTED]> wrote: > > > > > The web server never gets the URL which as typed by the user. At least > > the protocol (http vs. https), is lost. This is what

Re: [Zope3-Users] Site Search (Text) Design Pattern Trouble

2007-10-27 Thread Frank Burkhardt
Hi, On Fri, Oct 26, 2007 at 03:29:15PM -0400, Jeremy Roberts wrote: [snip] > I'm starting to suspect my design pattern here isn't going to support > my requirements. Has anyone solved this problem or have any pattern > advice? On my Site, I always try to obey the rule, that the default view of

[Zope3-Users] InvalidObjectReference error

2008-01-21 Thread Frank Burkhardt
Hi, my zope 3 server contains a modified principal folder which is updated on a regular basis via XMLRPC. This usually works fine but after some days, the update process makes the zope server raise this error: InvalidObjectReference: Attempt to store a reference to an object from a separate con

[Zope3-Users] Preferred languages

2008-04-17 Thread Frank Burkhardt
Hi, there's a problem with my web application. It's written in Zope 3 and makes heavy use of i18n (-> _("..."), i18n:translate, ...). I extracted the english strings and made a german translation (language code 'de'). Whenever my browser's "most" preferred language is 'de' or 'de-de' (example: "A

Re: [Zope3-Users] Re: Preferred languages

2008-04-18 Thread Frank Burkhardt
Hi, On Fri, Apr 18, 2008 at 01:47:46PM +0200, Philipp von Weitershausen wrote: > Frank Burkhardt wrote: [snip] > >Is there a way to tell Zope to use the hardcoded strings, when 'en' is > >requested? > > Register (empty) English translations for your pro

[Zope3-Users] resource-directories

2008-12-02 Thread Frank Burkhardt
Hi everyone, how can I get a list of all resourceDirectory's which are currently accessible via my zope instance? I'm interested in a name->physical_directory for all of them mapping. Thank you, Frank ___ Zope3-users mailing list Zope3-users@zope.org h

  1   2   >