[Zope3-Users] Port Zope3 product to Zope2/Plone

2007-03-24 Thread Hermann Himmelbauer
Hi, I'd like to develop a little Zope3 package which I also want to use with a recent Zope2/Plone release. Is this possible? If yes, what do I have to do to be compatible? Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4

Re: [Zope3-Users] Guidance on accessing MySQL db.

2007-03-31 Thread Hermann Himmelbauer
Am Samstag, 31. März 2007 00:32 schrieb Rich C: Hello all, I've just started using Zope 3 and am having some difficulty finding examples on a good way to access a MySQL database. For the moment, I'd just like to be able to read from the database and display it in a web page with decent

Re: [Zope3-Users] EditForm fails in SiteManager because of containment constraint

2007-04-08 Thread Hermann Himmelbauer
Am Samstag, 7. April 2007 18:06 schrieb Christophe Combelles: Hello, I have a regular content object which uses the formlib for its edit view. Nothing special, just like a Recipe. But I want this object to only reside in the Site Manager, because it will be used as a configurable local

Re: [Zope3-Users] Re: EditForm fails in SiteManager because of containment constraint

2007-04-08 Thread Hermann Himmelbauer
Am Samstag, 7. April 2007 18:43 schrieb Christophe Combelles: Jürgen Kartnaller a écrit : Christophe Combelles wrote: Hello, I have a regular content object which uses the formlib for its edit view. Nothing special, just like a Recipe. But I want this object to only reside in the Site

Re: [Zope3-Users] Re: EditForm fails in SiteManager because of containment constraint

2007-04-09 Thread Hermann Himmelbauer
Am Montag, 9. April 2007 00:13 schrieb Philipp von Weitershausen: Hermann Himmelbauer wrote: A good solution would be to either making the error message more verbose, or to automatically omit such attributes in the formlib (which could also lead to other problems). -1 on automatic

Re: [Zope3-Users] Can interfaces be mutated cleanly?

2007-04-13 Thread Hermann Himmelbauer
Am Donnerstag, 12. April 2007 17:22 schrieb Christian Theune: Hi, I didn't find anything in the documentation or google on this: I want to define an interface like: class IMySchema(zope.interface.Interface): pass Later, I want to use ore.alchemist which currently is able to take a

Re: [Zope3-Users] Can interfaces be mutated cleanly?

2007-04-13 Thread Hermann Himmelbauer
Am Freitag, 13. April 2007 20:27 schrieb Kapil Thangavelu: i would suggest some alternatives approaches to consider first. potentially this would be easier going the other way around with zs2sa, and generating the mapper from there, you don't need to annotations as well since the zope schemas

Re: [Zope3-Users] Can interfaces be mutated cleanly?

2007-04-13 Thread Hermann Himmelbauer
Am Freitag, 13. April 2007 20:33 schrieb Kapil Thangavelu: On Fri, 13 Apr 2007 02:36:07 -0400, Hermann Himmelbauer [EMAIL PROTECTED] wrote: Am Donnerstag, 12. April 2007 17:22 schrieb Christian Theune: Hi, I didn't find anything in the documentation or google on this: I want

[Zope3-Users] Interfaces in Schemas

2007-04-18 Thread Hermann Himmelbauer
Hi, I wonder if it's possible to define attributes in a schema that reference other interfaces. For instance, I have a schema for a car and another one for a wheel and what I want to do is something like that: class IWheel(Interface): type = TextLine() class ICar(Interface):

Re: [Zope3-Users] Interfaces in Schemas

2007-04-19 Thread Hermann Himmelbauer
Am Mittwoch, 18. April 2007 23:24 schrieb Darryl Cousins: Hi, On Wed, 2007-04-18 at 09:21 -0700, Martin Aspeli wrote: Hermann Himmelbauer wrote: Hi, I wonder if it's possible to define attributes in a schema that reference other interfaces. For instance, I have a schema for a car

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

[Zope3-Users] Wrong contained type - why?

2007-04-23 Thread Hermann Himmelbauer
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 correctly: email_widget =

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

2007-04-27 Thread Hermann Himmelbauer
Am Donnerstag, 26. April 2007 18:50 schrieb 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

[Zope3-Users] Arranging widgets in a form / Limit size of input fields

2007-05-02 Thread Hermann Himmelbauer
Hi, I'd like to know how to arrange (e.g. group) widgets in a form with formlib. One way would be to create a custom template file, where each widget is placed via HTML. However, this is quite some work. Another way would be to place the fields via CSS. How do you deal with form layout?

Re: [Zope3-Users] Arranging widgets in a form / Limit size of input fields

2007-05-03 Thread Hermann Himmelbauer
Am Donnerstag, 3. Mai 2007 08:57 schrieb Darryl Cousins: Hi, On Wed, 2007-05-02 at 15:07 +0200, Hermann Himmelbauer wrote: Hi, I'd like to know how to arrange (e.g. group) widgets in a form with formlib. One way would be to create a custom template file, where each widget is placed

Re: [Zope3-Users] Remote authentication

2007-05-10 Thread Hermann Himmelbauer
Am Donnerstag, 10. Mai 2007 18:13 schrieb David Pratt: Hi. Has anyone got a bit of a blueprint for a remote authentication in zope 3. I wish to authenticate on a z3 site (site 1) using credentials stored on a different z3 site (site 2) over the Internet (otherwise would likely use LDAP). I do

[Zope3-Users] PAU - how to give a principal a role

2007-05-15 Thread Hermann Himmelbauer
Hi, I have to write an Authenticator Plugin for my application. My login/pass data is stored in a relational database, which I access via zsqlalchemy. I have several objects, which are secured by certain permissions. Moreover I granted permissions to several roles, which I also defined. My

Re: [Zope3-dev] Re: [Zope3-Users] z3c.form 1.0.0 released!

2007-05-31 Thread Hermann Himmelbauer
Am Donnerstag, 31. Mai 2007 08:09 schrieb Maciej Wisniowski: It would be very interesting to see RDBMS interaction. Formlib for example is not trivial to use with RDBMS especially because of a lack of documentation and because everything seems to be written with ZODB objects in mind.

Re: [Zope3-dev] Re: [Zope3-Users] z3c.form 1.0.0 released!

2007-05-31 Thread Hermann Himmelbauer
Am Donnerstag, 31. Mai 2007 10:16 schrieb Stephan Richter: On Thursday 31 May 2007 03:48, Hermann Himmelbauer wrote: Anyway, in my case a decent ORM-integration with Zope3 forms is still a key issue to me. If you provide me with a simple hello world-like example of the ORM stuff you

[Zope3-Users] zope:class for multiple classes / inheriting configuration?

2007-06-01 Thread Hermann Himmelbauer
Hi, I have the problem here that I have to configure several classes, which I currently do via zope's zope:class directive, such as: class class=.foo.f1 require permission = zope.View interface=.interfaces.If1 / require permission=zope.ManageContent set_schema=.interfaces.IEmail /

[Zope3-Users] Utility for removing unneeded import statements

2007-06-05 Thread Hermann Himmelbauer
Hi, During development and especially refactoring, I'm often confronted with cleaning up import statements. Missing imports are reported by Python, however, unneeded imports are not. I don't know if unneded imports are a performance issue, nevertheless it probably makes sense to clean them up

[Zope3-Users] z3c.forms: Datamanger that combines values of multiple widgets

2007-06-12 Thread Hermann Himmelbauer
Hi, I've read the doctests of z3c.forms and have to say that the package is really impressive. Many things look a lot cleaner and more customizeable than formlib. Thanks! However, what I don't know is how to read/write values of multiple widgets into one context attribute. A common example of

[Zope3-Users] z3c.form - How to register IFormLayer?

2007-06-15 Thread Hermann Himmelbauer
Hi, I'm currently testing z3c.form in my project, however I could not get it running until I found out that the request object must provide IFormLayer. I temporarily solved this through a dirty hack in the form.py file (alsoProvides(self.request, IFormLayer)), but I'd rather like to have a

Re: [Zope3-Users] z3c.form and subforms in an AddForm?

2007-06-19 Thread Hermann Himmelbauer
Am Freitag, 15. Juni 2007 19:52 schrieb gnosis: I've been trying out the new z3c form package and like what I see. I am having problems getting a subform in an AddForm though. The subform.txt covers EditForms where you have a context object to work on, in an AddForm the context is the

Re: [Zope3-Users] Application instantiation without ZMI

2007-06-20 Thread Hermann Himmelbauer
Am Montag, 18. Juni 2007 13:36 schrieb Brian Sutherland: On Mon, Jun 18, 2007 at 07:57:10PM +1000, John Maddison wrote: Hi all, I've just started playing around with using z3c.layer to create applications that don't use the ZMI at all. Everything is pretty simple so far, except for one

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

2007-06-20 Thread Hermann Himmelbauer
Hi, Is there a way to assign a skin/layer to a specific site? In my case I'd like to have the rotterdam skin for the root folder, for root['mysite1'], I'd like to have MySkin1, and for root['mysite2'] MySkin2. Moreover I do not want to have the ++skin++ directive in the URL. The only way I

Re: [Zope3-Users] z3c.form - How to register IFormLayer?

2007-06-21 Thread Hermann Himmelbauer
Am Mittwoch, 20. Juni 2007 00:24 schrieb Stephan Richter: On Friday 15 June 2007 12:10, Hermann Himmelbauer wrote: So, at first, what's the idea with this IFormLayer? Why does any request to provide this interface? How can I tell Zope that all requests implement this interface

[Zope3-Users] pagelets vs. pages

2007-06-26 Thread Hermann Himmelbauer
Hi, It seems that the z3c.formdemo examples are based on pagelets, as they seem to perfectly integrate with z3c.form. Therefore I had a look at it and moreover at z3c.layer.pagelet, which is a minimal skin for a pagelet based application. What I don't fully understand is if a pagelet-based

Re: [Zope3-Users] Trouble with Skins

2007-06-27 Thread Hermann Himmelbauer
Am Dienstag, 26. Juni 2007 12:43 schrieb Arne Nordmann: Hi, I tried to create my own skin for a website of mine. I used Phillip's book (2nd version) and tried to do everything analog (just different names and a slightly different file structure). If I call a test view (registered for

[Zope3-Users] Custom Schemas, form widgets

2007-07-03 Thread Hermann Himmelbauer
Hi, I wonder if there's a package that extends Zope's schemas and widgets as Zope covers only basic ones. There are several missing schemas that derive from a TextLine but have custom validation methods, e.g. for URLs, for an email address etc. Moreover there are several widgets missing, e.g.

Re: [Zope3-Users] z3c.form and subforms in an AddForm?

2007-07-03 Thread Hermann Himmelbauer
Am Dienstag, 3. Juli 2007 14:57 schrieb Matt Bowen: Hi Stephen I'm in the same place as Hermann -- I've followed formdemo's message package as closely as I can and made an object in debug mode, but when I try to view or edit it, zope says it can't find index.html or edit.html. At some point

Re: [Zope3-Users] z3c.form and subforms in an AddForm?

2007-07-04 Thread Hermann Himmelbauer
Am Mittwoch, 4. Juli 2007 00:33 schrieb Matt Bowen: That was not at all a silly question! That got me a little closer -- I am new enough not to have understood that i needed the ++skin++. Now, instead of a 404 page, I get the following when I try to display my object: 127.0.0.1 - -

[Zope3-Users] Simple Add example for z3c.forms.subforms

2007-07-04 Thread Hermann Himmelbauer
Hi, I had a look at the Addressbook demo, which is quite complicated, therefore I at first try to set up a very simple application, very similar to the example in the doctest subform.txt, where I have a main object (car) that has a subobject (owner), which are stored together. So, basically

Re: [Zope3-Users] z3c.form and subforms in an AddForm?

2007-07-04 Thread Hermann Himmelbauer
Am Mittwoch, 4. Juli 2007 18:59 schrieb Matt Bowen: File /opt/zope/python2.4/lib/python2.4/site-packages/z3c.form- 1.3.0-py2.4.egg/z3c/form/form.py, line 167, in updateWidgets self.widgets = zope.component.getMultiAdapter( File /opt/zope/zope-3.4.0a1/lib/python/zope/component/_api.py,

[Zope3-Users] Skin based on IPageletBrowserLayer

2007-07-05 Thread Hermann Himmelbauer
Hi, In my views, based on pagelets/z3c.form, it is recommended to use a Layer/Skin based on IPageletBrowserLayer instead of IDefaultBrowserLayer. My problem is that when requests are marked with IPageletBrowserLayer, there are no error messages, no 404's, nothing. In case of a zope error, the

[Zope3-Users] z3c.form - Idea for subforms

2007-07-05 Thread Hermann Himmelbauer
Hi, After playing around with subforms, I think some parts could be more implicit. What I don't like so much is that there's quite some boilerplate code which is not easily understandable for a newbie, moreover the explicit code is also hard to understand (at least for me) unless one does have

Re: [Zope3-Users] z3c.form and subforms in an AddForm?

2007-07-06 Thread Hermann Himmelbauer
Am Freitag, 6. Juli 2007 03:14 schrieb Matt Bowen: Stephan and Hermann, maximum recursion depth exceeded That is a good hint, so you're recursively calling something. /opt/zope/zope-3.4.0a1 /lib/python/zope/tal/talinterpreter.py(379)do_startEndTag() - self.do_startTag(stuff, self.endsep,

Re: [Zope3-Users] ForbiddenAttribute error

2007-07-07 Thread Hermann Himmelbauer
Am Freitag, 6. Juli 2007 16:29 schrieb Mikael Moutakis: Hello I wrote a feed aggregator using the module FeedParser. I stored the RSS feed url in a persistant content component and retrieved the feed data in the view class. But I thought that I should move the feed data into the content

[Zope3-Users] z3c.form - field description - widget hint?

2007-07-10 Thread Hermann Himmelbauer
Hi, I wonder what happens with the field description during widget creation - it seems that it is currently not regarded. However, in forms.txt, a widget attribute called hint is mentioned (line 238), which seems not to be available. I assume that the field description should be converted to

[Zope3-Users] Introducing z3c.form - widget snippets

2007-07-11 Thread Hermann Himmelbauer
Hi, I extended the z3c.form package a little bit by form snippets, which eases the development of custom form templates. Widget Snippets are a way to automatically surround widget code by custom HTML code, e.g. by error handling, a label etc. Snippets can be accessed over a sub-object of the

[Zope3-Users] Re: Introducing z3c.form - widget snippets

2007-07-13 Thread Hermann Himmelbauer
Am Freitag, 13. Juli 2007 16:08 schrieb Stephan Richter: On Wednesday 11 July 2007 12:14, Hermann Himmelbauer wrote: Please tell me what you think, if you like it, perhaps it could be included in z3c.form? I have the same question as Roger. Hmmm, I missed that one, I think... What do

[Zope3-Users] Re: Skin based on IPageletBrowserLayer

2007-07-13 Thread Hermann Himmelbauer
Am Freitag, 13. Juli 2007 16:33 schrieb Stephan Richter: On Thursday 05 July 2007 04:54, Hermann Himmelbauer wrote: My problem is that when requests are marked with IPageletBrowserLayer, there are no error messages, no 404's, nothing. In case of a zope error, the browser displays Traversal

Re: [Zope3-Users] Building an admin interface

2007-07-17 Thread Hermann Himmelbauer
Am Montag, 16. Juli 2007 22:44 schrieb Stephan Richter: On Monday 16 July 2007 15:58, Benji York wrote: This reminds me of something I've been curious about but haven't had time to research lately.  What are the differences between pagelets and viewlets and their various

[Zope3-Users] z3c.form: Integer-based fields incorrectly validated

2007-08-01 Thread Hermann Himmelbauer
Hi, In one of my forms, one field is defined like that: foobarid = Int( title=u'ID', description=u'ID of Foobar', required=False) When I add this field in a z3c.form based form, e.g.: fields = field.Fields(IFoo['foobarid']) Then the validation of the field fails,

Re: [Zope3-Users] z3c.form: Integer-based fields incorrectly validated

2007-08-02 Thread Hermann Himmelbauer
Am Mittwoch, 1. August 2007 20:37 schrieb Markus Leist: Hi, do you have a from zope.schema.fieldproperty import FieldProperty class Foo: implements(IFoo) foobarid = FieldProperty( IFoo['foobarid']) I do have an object that implements my IFoo interface, however, I don't use

Re: [Zope3-Users] Is a view persistent?

2007-08-06 Thread Hermann Himmelbauer
Am Donnerstag, 2. August 2007 13:37 schrieb Fred Drake: On 8/2/07, Hermann Himmelbauer [EMAIL PROTECTED] wrote: mylist = [] @button.buttonAndHandler(_(u'Suchen'), name='suchen') def handle_suchen(self, action): self.mylist.append(123) When I output mylist

Re: [Zope3-Users] Rendering subobjects in pages

2007-08-06 Thread Hermann Himmelbauer
Am Montag, 6. August 2007 14:21 schrieb Greg Baker: 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. class Contact:

[Zope3-Users] How to access request variable from vocabulary

2007-08-06 Thread Hermann Himmelbauer
Hi, I have a simple function that is registered a vocabulary for a Choice-widget. My problem is that the vocabulary should access the session, which seems to be only possible if I somehow get the request variable, which is available in a view. (A common way to retrieve the session seems to be

Re: [Zope3-Users] How to access request variable from vocabulary

2007-08-07 Thread Hermann Himmelbauer
Am Montag, 6. August 2007 19:08 schrieb Benji York: Adam Groszer wrote: I'm using something like this: def getCurrentRequest(): return getInteraction().participations[0] It is, of course, better if you can structure your app so you don't have to pull the request out of thin air,

Re: [Zope3-Users] z3c.form: Integer-based fields incorrectly validated

2007-08-08 Thread Hermann Himmelbauer
Am Mittwoch, 8. August 2007 05:45 schrieb Stephan Richter: On Wednesday 01 August 2007 13:15, Hermann Himmelbauer wrote: In one of my forms, one field is defined like that: The entered value is not a valid integer literal. Interestingly, if I set 1,123 as value, zope outputs

[Zope3-Users] Strange ZODB error

2007-08-09 Thread Hermann Himmelbauer
Hi, After updating some z3c packages and changing some of my code, I receive a very strange traceback from Zope3: -- Traceback (most recent call last): File /local/home/dusty/Zope-3.4.0b1/lib/python/zope/publisher/publish.py, line 138, in publish

Re: [Zope3-Users] Strange ZODB error - Solved: Zalchemy bug

2007-08-09 Thread Hermann Himmelbauer
Am Donnerstag, 9. August 2007 15:44 schrieb Hermann Himmelbauer: Hi, After updating some z3c packages and changing some of my code, I receive a very strange traceback from Zope3: Ah, after fiddling around I found out that the svn update of the zalchemy package resulted in this error

Re: [Zope3-Users] z3c.form: How to hide a button/define action without a button?

2007-08-09 Thread Hermann Himmelbauer
Am Donnerstag, 9. August 2007 04:08 schrieb Stephan Richter: On Monday 06 August 2007 10:41, Hermann Himmelbauer wrote: Is there a way simple way to accomplish this? Perhaps via a hidden=True   attribute in the buttonAndHandler decorator method? I would override the ``updateActions

Re: [Zope3-Users] Using zope.formlib for a search form

2007-08-10 Thread Hermann Himmelbauer
Am Freitag, 10. August 2007 04:14 schrieb Andrew Groom: Hi All, I've been battling with formlib for the last three days now and, while Uh oh, sorry, formlib. My example was based on z3c.form. Anyway, I would recommend you to have a decent look at this library, as I struggled a lot with

Re: [Zope3-Users] Using zope.formlib for a search form

2007-08-10 Thread Hermann Himmelbauer
Am Freitag, 10. August 2007 04:14 schrieb Andrew Groom: Hi All, I've been battling with formlib for the last three days now and, while I've learnt a lot, it's nearly driven me crazy. I'm trying to use it to create simple search form, i.e., a form that does input validation, remembers the

Re: [Zope3-Users] Problems importing zalchemy

2007-08-10 Thread Hermann Himmelbauer
Am Freitag, 10. August 2007 08:28 schrieb Christian Theune: Hey, Am Freitag, den 27.07.2007, 11:18 +1000 schrieb Catriona Johnson: Hello I am a novice zope 3 user and would appreciate any help on this. I am trying to follow a few examples using zalchemy but am unable to progress

Re: [Zope3-Users] Re: Strange ZODB error - Solved: Zalchemy bug

2007-08-13 Thread Hermann Himmelbauer
Am Montag, 13. August 2007 08:10 schrieb Christian Zagrodnick: On 2007-08-09 17:21:57 +0200, Christian Zagrodnick [EMAIL PROTECTED] said: On 2007-08-09 16:27:23 +0200, Hermann Himmelbauer [EMAIL PROTECTED] said: Am Donnerstag, 9. August 2007 15:44 schrieb Hermann Himmelbauer: Hi

Re: [Zope3-Users] Invariants and forms

2007-08-13 Thread Hermann Himmelbauer
Am Montag, 13. August 2007 12:01 schrieb Darryl Cousins: Hi, This was answered recently me thinks. http://mail.zope.org/pipermail/zope3-users/2007-August/006648.html I think this covers a z3c.form-related issue, but not formlib... Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID:

[Zope3-Users] z3c.form - how to raise/create an error in an action?

2007-08-13 Thread Hermann Himmelbauer
Hi, I have a case where an error may occur in the form-action method (z3c.form, not formlib!), e.g. when data is not found in my database. I'd then like to output this error, similar when a widget error occurs. Moreover there are two simple cases: 1) Errors that are related to a widget (hence

Re: [Zope3-Users] z3c.form - how to raise/create an error in an action?

2007-08-13 Thread Hermann Himmelbauer
Am Montag, 13. August 2007 19:42 schrieb Stephan Richter: On Monday 13 August 2007 12:02, Hermann Himmelbauer wrote: I have a case where an error may occur in the form-action method (z3c.form, not formlib!), e.g. when data is not found in my database. I'd then like to output this error

Re: [Zope3-Users] z3c.form: Howto include validation errors into a custom pagetemplate?

2007-08-14 Thread Hermann Himmelbauer
Am Dienstag, 14. August 2007 12:45 schrieb Peter Piehler: Hello, i have a spreadsheet like z3c.formdemo spreadsheet. I copy and paste ul class=errors tal:condition=view/widgets/errors metal:define-macro=errors li tal:repeat=error

Re: [Zope3-Users] Creating edit form with z3c.form

2007-08-18 Thread Hermann Himmelbauer
Am Samstag, 18. August 2007 12:53 schrieb Florian Lindner: Hello, I try to create an edit form with z3c.form but it gives me an system error only: File /home/florian/Desktop/zope/lib/python/z3c/form/form.py, line 120, in updateWidgets self.widgets = zope.component.getMultiAdapter(

Re: [Zope3-Users] Creating edit form with z3c.form

2007-08-20 Thread Hermann Himmelbauer
Am Montag, 20. August 2007 12:09 schrieb Florian Lindner: Am Sonntag, 19. August 2007 schrieb Hermann Himmelbauer: Am Samstag, 18. August 2007 12:53 schrieb Florian Lindner: Hmmm, perhaps the browser request is not marked with the IFormLayer layer? (Hence you need a skin that derives from

Re: [Zope3-Users] z3c.form / TextLine-Schema in List-Schema

2007-09-03 Thread Hermann Himmelbauer
Am Sonntag, 2. September 2007 18:26 schrieb Markus Leist: Hi list, z3c.form has a very generic, well approach - but at the moment it's to complicated to me. I have an interface defined like: 100 osList = List ( 101 title = _(operating systems), 103 value_type =

[Zope3-Users] PAU / credentials / authentication

2007-09-05 Thread Hermann Himmelbauer
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 several of these sites - Users should

Re: [Zope3-Users] zalchemy with sqlalchemy 0.4 support?

2007-09-10 Thread Hermann Himmelbauer
Am Sonntag, 9. September 2007 09:55 schrieb Christian Theune: Hi, Am Samstag, den 08.09.2007, 20:46 +0200 schrieb Peter Piehler: Does anybody know if there is a zalchemy version, which supports sqlalchemy 0.4? There isn't, right now. 0.4 introduced some incompatibilities. At this time

Re: [Zope3-Users] Implementing a DropdownWidget for a country-code vocabulary

2007-09-17 Thread Hermann Himmelbauer
Am Samstag, 15. September 2007 18:08 schrieb Jesper Petersen: Hello!I'm trying to implement a DropdownWidget for my country list. In my app i'd like to have a dropdown menu where a user can choose a country (for my main content object, a job). My vocabulary is created from a list of strings,

[Zope3-Users] How to best include Zope3-based code in Zope3 unrelated Python projects?

2007-09-21 Thread Hermann Himmelbauer
Hi, I have the problem that I cannot include parts of my Zope3 project in external, Zope3-unrelated projects due to import errors. For instance, I currently build a LaTeX converter that automatically converts SQL-Alchemy table definitions into nicely formatted LaTeX that I can then include in

[Zope3-Users] Interfaces with circular references

2007-09-21 Thread Hermann Himmelbauer
Hi, Does someone know how to create interfaces with circular references? E.g.: class IHusband(Interface): wife = Object(schema=IWife) class IWife(Interface): husband = Object(schema=IHusband) What's the suggested solution to this problem? Perhaps I should modify the classes after they

Re: [Zope3-Users] Eggs and classic instance homes, again... (was Re: Eggs, workingenv.py, and 'classic' instance homes)

2007-11-08 Thread Hermann Himmelbauer
Am Freitag, 9. November 2007 01:31 schrieb Jeff Shell: Oops. Forgot to send this to the list as well as Stephan. Goddamn Gmail. On Nov 8, 2007 8:28 AM, Stephan Richter [EMAIL PROTECTED] wrote: Hi Jeff, - zope.component 3.4.0 (or anything built into the zope 3.4 tarball) -

Re: Zope 3 w/ SQLAlchemy 0.4 (was Re: [Zope3-Users] Eggs and classic instance homes, again...)

2007-11-09 Thread Hermann Himmelbauer
Am Freitag, 9. November 2007 18:44 schrieb Jeff Shell: On Nov 9, 2007 12:04 AM, Hermann Himmelbauer [EMAIL PROTECTED] wrote: Am Freitag, 9. November 2007 01:31 schrieb Jeff Shell: - zope.component 3.4.0 (or anything built into the zope 3.4 tarball) - sqlalchemy 0.4.0

[Zope3-Users] How to close a ZODB connection and reopen it for testing?

2007-11-19 Thread Hermann Himmelbauer
Hi, I am currently writing a doctest for one of my persistent classes. It's purpose is to check, if object modifications, e.g. through methods, are really persistent, however, my objects are magically remembered, therefore I cannot properly test them. My doctest looks like this: from ZODB

Re: [Zope3-Users] How to persist an attribute of list type

2007-12-02 Thread Hermann Himmelbauer
Am Freitag, 30. November 2007 19:34 schrieb Yuan HOng: Hi, It seems that I can not get list attribute of an persistent object changed. I have the following class, which has a list as one of its attributes: class Cart(Persistent): items = [] amount = 0 Hehe, I had the same pitfall

[Zope3-Users] Building a viewlet-based menu

2008-01-04 Thread Hermann Himmelbauer
Hi, I'm currently trying to build a viewlet-based menu. As any common menu, it should consist of entries, which link in my case to certain object views. If such a link is clicked, the menu entry should change (no link) to denote that the entry is selected. Therefore I built a base class that

[Zope3-Users] How to store objects with multiple owners in the ZODB

2008-01-08 Thread Hermann Himmelbauer
Hi, I have the following scenario here (somehow similar to hard links on a UNIX system): - Users should be able to create documents (then they are owners) - Users may grant ownership of their document to other users - Users may abandon their document (no owner) - Documents, who have no owner,

Re: [Zope3-Users] how to model a 1-to-1 relation

2008-01-11 Thread Hermann Himmelbauer
Am Donnerstag, 10. Januar 2008 23:00 schrieb john saponara: I want to allow the user to create car and driver objects in a limoService container. Car objects will stand alone, but each driver object should contain a car object by reference (not by value) and the driver add form should allow

Re: [Zope3-Users] Beginner: Reference to ZPT macros

2008-01-16 Thread Hermann Himmelbauer
Am Mittwoch, 16. Januar 2008 19:27 schrieb Achim Domma: Hi, I have a simple view. Here is the entry in configure.zcml: browser:page for=.CMS.Page name=index.html class=.CMS.PageView permission=zope.Public template=index.pt menu=zmi_views

[Zope3-Users] SessionCredentialsPlugin + z3c.pagelets/z3c.form

2008-02-04 Thread Hermann Himmelbauer
Hi, I'm currently trying to integrate the SessionCredentialsPlugin with z3c.pagelets / z3c.form. I currently set up a simple z3c.form-based login page and configured the loginfield/passwordfield to form.widgets.login/password. Now I can login, but I still have some problems: 1) I'd like to be

Re: [Zope3-Users] Zope translation status

2008-02-04 Thread Hermann Himmelbauer
Am Montag, 4. Februar 2008 22:51 schrieb Christophe Combelles: Below is the translation status of Zope 3.4.0c1, as generated by the i18nstats tool. Is there anyone willing to update the translation for his/her language before 3.4.0 final is (soon) released? Maybe I could do so for german

[Zope3-Users] z3c.form - howto ignore the context for single widgets in an Edit form?

2008-02-07 Thread Hermann Himmelbauer
Hi, I'm creating a simple user-administration, which requires the user to type in the password and a password confirmation. For that, I have an interface which contains the attributes password and password_confirm. Of course, only the password is stored as an object attribute. When I now use

Re: [Zope3-Users] Re: Zope eggification - impressions

2008-02-07 Thread Hermann Himmelbauer
Am Donnerstag, 7. Februar 2008 17:36 schrieb Philipp von Weitershausen: Hermann Himmelbauer wrote: At first, thanks to the newest Zope-3.4.0c1 release. I just installed it from the tarball and it seems to work. However, I'm still somehow technically overwhelmed by installing Zope3

Re: [Zope3-Users] z3c.form - howto ignore the context for single widgets in an Edit form?

2008-02-07 Thread Hermann Himmelbauer
Am Freitag, 8. Februar 2008 01:33 schrieb Christophe Combelles: Stephan Richter a écrit : On Thursday 07 February 2008, Christophe Combelles wrote: Maybe the best way to have a password validation would be to let the PasswordWidget display two password fields and check itself the values

Re: [Zope3-Users] z3c.form - howto ignore the context for single widgets in an Edit form?

2008-02-07 Thread Hermann Himmelbauer
Am Freitag, 8. Februar 2008 00:48 schrieb Stephan Richter: On Thursday 07 February 2008, Christophe Combelles wrote: Maybe the best way to have a password validation would be to let the PasswordWidget display two password fields and check itself the values are the same? Bingo. :-) I Would

Re: [Zope3-Users] z3c.form - howto ignore the context for single widgets in an Edit form?

2008-02-08 Thread Hermann Himmelbauer
Am Freitag, 8. Februar 2008 09:33 schrieb Christophe Combelles: Hermann Himmelbauer a écrit : Am Freitag, 8. Februar 2008 00:48 schrieb Stephan Richter: Right, that seems to be a perfect solution. Btw., it seems that there are quite some generic widget/field-patterns that a lot of people

Re: [Zope3-Users] Re: Zope eggification - impressions

2008-02-08 Thread Hermann Himmelbauer
Am Freitag, 8. Februar 2008 10:10 schrieb Kai Diefenbach: I've also started to dive into plain Zope 3 development (coming from Plone) and I like it very much. But as you mentioned I also found it somewhat hard to start. What I have found helpful so far is: Thanks for the links! Code

Re: [Zope3-Users] login/logout with z3c.pagelet?

2008-02-12 Thread Hermann Himmelbauer
Hi, Are there any login/logout/redirect templates for z3c.pagelet? I could reuse the templates from zope.app.authentication, but they obviously contain some macros that need some registrations I don't have, such as @@standard_macros. And my layout template does not contain any macro.

[Zope3-Users] How to check access on a view?

2008-02-16 Thread Hermann Himmelbauer
Hi, For a simple menu, I need to check if the current principal has permissions to access a view. I understand that I can use the canAccess()/canWrite() function on object attributes but how could I do this for views? Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on

Re: AW: [Zope3-Users] How to check access on a view?

2008-02-18 Thread Hermann Himmelbauer
Am Sonntag, 17. Februar 2008 12:41 schrieb Roger Ineichen: Hi Hermann Betreff: Re: [Zope3-Users] How to check access on a view? [...] Hi, For a simple menu, I need to check if the current principal has permissions to access a view. I understand that I can use the

Re: AW: AW: [Zope3-Users] z3c.form - howto ignore the context for singlewidgets in an Edit form?

2008-02-18 Thread Hermann Himmelbauer
Am Sonntag, 10. Februar 2008 19:39 schrieb Roger Ineichen: Hi Christophe Betreff: Re: AW: [Zope3-Users] z3c.form - howto ignore the context for singlewidgets in an Edit form? [...] class ISubscribeSchema(zope.interface.Interface): The subscription form. password =

Re: AW: [Zope3-Users] eggsplosion again

2008-02-18 Thread Hermann Himmelbauer
Am Sonntag, 10. Februar 2008 15:09 schrieb Roger Ineichen: Hi Christophe Betreff: [Zope3-Users] eggsplosion again [...] But I fear that in a near future we will need to start any interfaces.py with : import zope.schema import foo.schema import bar.schema (...) import

[Zope3-Users] Cloning interfaces/interface fields - how?

2008-02-19 Thread Hermann Himmelbauer
Hi, I'm over and over confronted with a simple pattern, where I need to clone interface field. For instance, I have the content object, which has an interface, e.g.: class IPerson(Interface): name = TextLine() address = TextLine() Then, I have for instance a search form, which consists of

Re: [Zope3-Users] Cloning interfaces/interface fields - how?

2008-02-19 Thread Hermann Himmelbauer
Am Dienstag, 19. Februar 2008 20:13 schrieb Marius Gedminas: On Tue, Feb 19, 2008 at 04:46:29PM +0100, Hermann Himmelbauer wrote: class SearchFrom(z3c.form.EditForm): fields = z3c.form.field.Fields(copy.deepcopy(IPerson).select('name')) Strike out the deepcopy and you've got the correct

Re: [Zope3-Users] How do you develop in zope 3?

2008-02-19 Thread Hermann Himmelbauer
Am Dienstag, 19. Februar 2008 16:22 schrieb [EMAIL PROTECTED]: Hello, * How do you develop in zope 3? *) Is it the way the experienced zope developers work? How do you set the environment for a site or a package development? I personally do it the old fashioned way: I downloaded the

[Zope3-Users] z3c.form - how to set single default values from another object?

2008-02-20 Thread Hermann Himmelbauer
Hi, Hi, I have here an add form which is based on an interface like this: class IMyObj(Interface): value1 = TextLine() value2 = TextLine() In my add form, I need to display a default value for value2. This default value is stored in another object, however, no default value should be

Re: AW: AW: [Zope3-Users] z3c.form - howto ignore the context for singlewidgets in an Edit form?

2008-02-20 Thread Hermann Himmelbauer
Am Donnerstag, 21. Februar 2008 04:41 schrieb Stephan Richter: On Monday 18 February 2008, Hermann Himmelbauer wrote: - Only widgets? - Combinations of schemas and widgets? - Also schemas without widgets (like an Email schema that inherits from a TextLine and thus uses a TextWidget

Re: [Zope3-Users] Cloning interfaces/interface fields - how?

2008-02-21 Thread Hermann Himmelbauer
Am Donnerstag, 21. Februar 2008 17:34 schrieb Marius Gedminas: On Wed, Feb 20, 2008 at 01:12:18PM -0500, Stephan Richter wrote: On Wednesday 20 February 2008, Hermann Himmelbauer wrote: Yes, I also use z3c.form, but my problem is that the field has the required flag set to True, which

[Zope3-Users] Efficiently retrieving objects from an index ordered after an object attribute.

2008-02-25 Thread Hermann Himmelbauer
Hi, I have a class looking similar to this: class person birthdate = None # Some date name = None # First name gender = None # Male/Femail Objects of this class are then added to a catalog, for which I defined an index (zc.catalog - ValueIndex) for each attribute. What I want to do

Re: [Zope3-Users] How to store objects with multiple owners in the ZODB

2008-02-28 Thread Hermann Himmelbauer
Am Sonntag, 27. Januar 2008 18:25 schrieb Stephan Richter: On Tuesday 08 January 2008, Hermann Himmelbauer wrote: My question is: How would I store these documents in the ZODB? If I create a container object for each user and store the document there, how would then other users get a link

[Zope3-Users] I18N: Recursive Translations / translations of mappings - how?

2008-03-05 Thread Hermann Himmelbauer
Hi, I have the quite generic problem that I need to translate strings that contain strings which also should be translated, for instance: --- snip from zope.component import provideUtility from zope.i18n import translate from zope.i18n.simpletranslationdomain import

[Zope3-Users] Skin and Cookie Path - Zope 3 bug?

2008-03-28 Thread Hermann Himmelbauer
Hi, In my Zope3-based site, I use the SessionCredentialsPlugin to extract my authentication information. This plugin also sets a cookie. Together with the cookie name, content and host, a path is stored. This path contains the skin, which I enter in my URL, e.g. for:

  1   2   >