Re: [Zope3-Users] Re: Zope 3.4.0a1 released

2007-04-20 Thread Christian Theune
Am Donnerstag, den 19.04.2007, 19:51 -0400 schrieb Robert Hicks:
 Martin Aspeli wrote:
  Robert Hicks wrote:
  Is this series targeting Python 2.5?
  
  No.
  
  Martin
 
 Thanks, I was just checking and didn't see anything either way.

The release announcement refers to Python 2.4, however, I realised that
putting the requirements listing in the download section is less than
optimal for people scanning the document. Sorry. I'll update the release
notes template.

Christian

-- 
gocept gmbh  co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Single formlib widget for several fields

2007-04-20 Thread Thierry Florac

  Hi,

I'd like to create a custom formlib widget which could handle several
fields at once ; for example, I'd like a set of fields like month and
year to be handled in a single widget which could display two
combo-boxes.

Do I have to join these fields in a single interface, for which I can
create and declare a custom widget, or can I handle such things without
modifying my current interface (which I'd prefer).

Thanks for any advise,

  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : [EMAIL PROTECTED]
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

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


[Zope3-Users] MultiCheckBoxWidget: for which schema field?

2007-04-20 Thread Christophe Combelles

Hello,

Sometimes I have difficulties to find out which schema fields are associated to 
which widgets.

Let's take the example of the MultiCheckBoxWidget:  I could make it work with a
List(...value-type=Choice(...))
but I don't know what fields it should normally be associated with.

Is there a way to know that?

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


Re: [Zope3-Users] Interfaces in Schemas

2007-04-20 Thread Hermann Himmelbauer
Am Donnerstag, 19. April 2007 17:06 schrieb Sascha Ottolski:
 Am Donnerstag 19 April 2007 schrieb Hermann Himmelbauer:
   Tried it out and it seems to work for Objects() in the schema.
  However, for Lists(value_type=Object()), I get permission problems:

 not a real answer, but another hint:

 http://zope3demos.googlecode.com/svn/trunk/otherdemos/objectsofobjects2/

Ah, that's nice and easy. Did not solve the permission problems, though. I 
found out that the list object, which I defined the Lists() schema for, is 
not a python list, instead it's a sqlalchemy.orm.attributes.InstrumentedList. 
Therefore it seems I have to set the permissions on this object, tried it 
like that: 

class class=sqlalchemy.orm.attributes.InstrumentedList
require
permission=zope.View
attributes=__iter__ __getitem__
/
/class

The permission problems are gone now, but I have still some object nesting 
problems with formlib. Here's what I have:

I have an object Kunde, which 1:1 relates to a Fp object. That Fp object 
relates 1:n to an Email object. I defined interfaces for all of these 
objects and configured them. The browser code looks now like this:

fp_widget =CustomWidgetFactory(ObjectWidget,Fp)
email_widget = CustomWidgetFactory(ObjectWidget,Email)
emails_widget = CustomWidgetFactory(ListSequenceWidget, 
subwidget=email_widget)

class EditKunde(form.Form):
form_fields = form.Fields(IKunde)
form_fields['fp'].custom_widget = fp_widget
# so far, this works, the Fp object is displayed.

# Now I need to apply the custom widget to the fp.emails list object
form_fields['fp'].emails.custom_widget = emails_widget
# Hmmm, this has no effect, I receive a ComponentLookupError:

ComponentLookupError: ((zope.schema._field.Object object at 0x31e9910, 
zc.resourcelibrary.publication.Request instance 
URL=http://localhost:8080/act/managekunde/index.html), InterfaceClass 
zope.app.form.interfaces.IInputWidget, u'')

Moreover it would be nice if I could omit some attributes of the sub-objects - 
do you know if there's some way to do that? E.g. something 
like form_fields.omit('fp.xyz'), or even more something 
like form_fields.omit('fp.emails.xyz')?

Best Regards,
Hermann

-- 
[EMAIL PROTECTED]
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Including overrides in buildout in site.zcml for zc.zope3recipes:app

2007-04-20 Thread David Pratt
I am wondering what to do about including overrides that would have 
normally gone into my /etc to be used in a globally. I am using the 
zope3recipes. It defines an app part with an explcit site.zcml.


site.zcml is used verbatim in the buildout but is also need it a layer 
to run functional tests. So the placement of the global overrides.zcml 
is the question. I am guessing that the only way to really deal with it 
would be to put it in one of the app packages and do


includeOverrides package=pkg.withoverrides /

and put it in the site.zcml but that does not seem right.  I also 
normally also put a paste.ini in /etc in a regular zope as well. So what 
to do with these things so they have the same net effect as a plain zope.


Many thanks.

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


Re: [Zope3-Users] session start/end

2007-04-20 Thread FB
Hi,

On Thu, Apr 19, 2007 at 12:40:54PM +0200, Sascha Ottolski wrote:
 Hi,
 
 reading through zope.app.session, I couldn't find any built-in support 
 for session_start and session_end events, similar to what existed in 
 Zope2. Are there any recipies for such a use case? Searching the web 
 didn't gave me pointers.
 
 And by the way, is it possible to programmatically access the sessions 
 of other users? If so, how would one do this? Of course I'm well aware 
 that security issues might arise.
 
 The use case for both questions would be to find out if a user 
 is online, as an information displayed to other users.

There's a persistent object in software space which stores the user session 
data.
However, there's no identification of the user stored in there - except of the
login credentials (-only if you use the Session-Credential-Plugin of PAU).

You'll have to either assign i.e. the principal id to a user's session data
on session creation or be happy with the login name.

Example:

from zope.app.session.interfaces import ISessionDataContainer
from zope.app import zapi

def getlogins():
   sdc=zapi.getUtility(ISessionDataContainer)
   sessions=sdc.values()
   for session in sessions:
  if 'zope.app.authentication.browserplugins' in session:
 yield session['zope.app.authentication.browserplugins'].getLogin()

(untestet, dangerous, no warranty, ...)

Regards,

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


Re: [Zope3-Users] Re: zope.intid and UUIDs

2007-04-20 Thread Benji York

I really like Gary's suggestions here, which I'll paraphrase:

First create interfaces that content can be adapted to to get a UUID, so 
other people can provide different implementations and those can 
interoperate.  Then, create default implementations that work however 
you like.


Then if you, or one of your users want to use a different, or second 
implementation, the migration will be much easier.

--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: zope.intid and UUIDs

2007-04-20 Thread Stephan Richter
On Friday 20 April 2007 10:01, Benji York wrote:
 First create interfaces that content can be adapted to to get a UUID, so
 other people can provide different implementations and those can
 interoperate.  Then, create default implementations that work however
 you like.

This is actually a pattern that we use all over the place. One example is 
lovely.tag. You have a utility providing some functionality, such as a UUID 
generator and then use an object adapter to access it more conveniently.

What *I* like about about the proposed solutions is to reuse the intid 
utility.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Including overrides in buildout in site.zcml for zc.zope3recipes:app

2007-04-20 Thread David Pratt
Hi. Tried putting overrides.zcml in my app package. To site.zcml in my 
buildout I added and includeOverrides to link to the overrides.zcml in 
the app package with something like this.


includeOverrides package=ns.myapp /

I have the same packages working a regular zope with a global overrides 
in /etc. In the buildout, adding the overrides to site.zcml this way 
does not produce same result. Any thing else I should try?


Many thanks

Regards,
David




David Pratt wrote:
I am wondering what to do about including overrides that would have 
normally gone into my /etc to be used in a globally. I am using the 
zope3recipes. It defines an app part with an explcit site.zcml.


site.zcml is used verbatim in the buildout but is also need it a layer 
to run functional tests. So the placement of the global overrides.zcml 
is the question. I am guessing that the only way to really deal with it 
would be to put it in one of the app packages and do


includeOverrides package=pkg.withoverrides /

and put it in the site.zcml but that does not seem right.  I also 
normally also put a paste.ini in /etc in a regular zope as well. So what 
to do with these things so they have the same net effect as a plain zope.


Many thanks.

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


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


Re: [Zope3-Users] Including overrides in buildout in site.zcml for zc.zope3recipes:app

2007-04-20 Thread David Pratt

My bad. This seems to do the trick.

includeOverrides package=ns.myapp file=overrides.zcml /

I incorrectly assumed includeOverrides would pick up the overrides file.

Regards,
David


David Pratt wrote:
Hi. Tried putting overrides.zcml in my app package. To site.zcml in my 
buildout I added and includeOverrides to link to the overrides.zcml in 
the app package with something like this.


includeOverrides package=ns.myapp /

I have the same packages working a regular zope with a global overrides 
in /etc. In the buildout, adding the overrides to site.zcml this way 
does not produce same result. Any thing else I should try?


Many thanks

Regards,
David




David Pratt wrote:
I am wondering what to do about including overrides that would have 
normally gone into my /etc to be used in a globally. I am using the 
zope3recipes. It defines an app part with an explcit site.zcml.


site.zcml is used verbatim in the buildout but is also need it a layer 
to run functional tests. So the placement of the global overrides.zcml 
is the question. I am guessing that the only way to really deal with 
it would be to put it in one of the app packages and do


includeOverrides package=pkg.withoverrides /

and put it in the site.zcml but that does not seem right.  I also 
normally also put a paste.ini in /etc in a regular zope as well. So 
what to do with these things so they have the same net effect as a 
plain zope.


Many thanks.

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




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