Re: [Zope3-Users] Zope 3 : Replace index.html with index_html

2011-01-15 Thread Stephan Richter
On Saturday, January 15, 2011, christophe petit wrote:
> Does i have to put this piece of code in a "configure.zcml"  file ? sorry,
> i'm not familiar with zcml. "layer" is a variable ?

I would suggest you read up on ZCML, since nothing in Zope 3 works really 
without it. You should also read up on layers and skins, since they are the 
mechanism to provide custom UIs for the same application base.

Regards,
Stephan
-- 
Entrepreneur and Software Geek
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
https://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope 3 : Replace index.html with index_html

2011-01-15 Thread Stephan Richter
On Saturday, January 15, 2011, christophe petit wrote:
> i would like to migrate from Zope 2.x to Zope 3. Is there a way in Zope 3
> to replace the root file "index.html" with "index_html" like into Zope 2.x
> ? so that we could have the same properties , i.e when we type
> "http://mysite.com/"; Zope calls the url "http://mysite.com/index_html";,
> and the same thing for sub-directories. It would make easier the
> migration.

https://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope3.3.0 with buildout

2010-02-18 Thread Stephan Richter
On Thursday 18 February 2010, Matthias Lehmann wrote:
> I fiddled some with buildout and the zc.zope3recipes, but without much
>  success,  so far. So I am wondering - does buildout work with Zope3
>  versions below 3.4 at all?

No. Unfortunately, Zope 3.4 was the first buildout based release.

Regards,
Stephan
-- 
Entrepreneur and Software Geek
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
https://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Getting the most specific interface

2009-08-27 Thread Stephan Richter
On Thursday 27 August 2009, Paul Wilson wrote:
> Relying on the first interface returned from 'implementedBy()' doesn't
> feel right. I've found another post asking roughly this question that
> uses 'queryType' [1], however that doesn't seem to be available these
> days.

No, it is right, since these methods always must honor the order. The same is 
true for `providedBy` of instances.

providedBy(myfoo).flattened() is the right resolution order.

Regards,
Stephan
-- 
Entrepreneur and Software Geek
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Intercepting exceptions in z3c.pagelets

2009-06-25 Thread Stephan Richter
On Wednesday 24 June 2009, andrew wrote:
> Does anyone here have any advice on the best (or any) way to intercept
> exceptions in z3c.pagelets ? I want to have a catch-all handler that
> handles any exceptions in a pagelet so I can, e.g., log the error and
> tell someone about it.
>
> I can handle any explicitly-raised Zope exceptions, it's the unexpected
> ones that are causing the problem :-)

This problem is not specific to z3c.pagelet.

The publisher catches all errors and reports them to the error reporting 
utility. Note that the error reporting utility also forwards the exception to 
the logs. Next the publisher looks up a view for the error and displays it.

This gives you several ways to hook into the error handling.

- Have specific exception log handlers that send out E-mail. This is a matter 
of configuration in zope.conf.

- Write custom error views. You then have full control of what you want to do.

Regards,
Stephan
-- 
Entrepreneur and Software Geek
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How do I learn how to use Zope?

2009-06-16 Thread Stephan Richter
On Tuesday 16 June 2009, Stephan Richter wrote:
> Hi Edward,
>
> if this is commercial project, I am gladly offering my consulting and
> training services. :-) Just let me know! ;-)

Oh my, do not answer E-mails when you are toast. ;-)

Regards,
Stephan
-- 
Entrepreneur and Software Geek
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How do I learn how to use Zope?

2009-06-16 Thread Stephan Richter
On Monday 15 June 2009, Edward Zwart wrote:
> I've been limping along for a couple weeks trying to learn this
> framework, and I'm completely stuck, and can barely even form a good
> question... so apologies in advance...

Hi Edward,

if this is commercial project, I am gladly offering my consulting and training 
services. :-) Just let me know! ;-)

Regards,
Stephan
-- 
Entrepreneur and Software Geek
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] z3c.form 2.0.0 released!

2009-06-13 Thread Stephan Richter
Hello everyone,

on behalf of the `z3c.form` developers, I am proud to announce the next major
released of `z3c.form` 2.0.0. `z3c.form` form is a flexible, rapid-development
form framework for Zope 3.

Thanks goes to everyone who helped out with the release!


For the curious and impatient ...
-

While we have not yet updated the demos to the latest features, the demo still
works and provides a quick introduction. To run the demos do the following::

  $ svn co svn://svn.zope.org/repos/main/z3c.formdemo/tags/2.0.0 formdemo
  $ cd formdemo
  $ python bootstrap.py
  $ ./bin/buildout
  $ ./bin/demo fg

Now you can access the demo under:

  http://localhost:8080/


What's new
--

`z3c.form` 2.0.0 provides many new features that were needed for our
projects. Here are the highlights.

- Several new, non-trivial widgets.

  * There is now a widget for sequence fields (`IList` and `ITuple` field)
whose value types are simple fields (like `TextLine`, `Int`, ...). It uses
simple sub-forms.

  * There is a text lines widget that provides a text area to enter one value
per line. Again sequence fieds with simple value types are supported.

  * An initial implementation of an object widget was created. This makes
developing forms much faster.

- Groups can now be nested.

- Besides vocabularies, sources are now supported.

- There is optional support for z3c.pt, a very fast implementation of TAL,
  TALES and METAL.

- Full backward-compatibility to Zope KGS 3.4.0 was kept to support a stable
  Zope 3 code base and the surrent Plone released.

Fore a complete list of changes, see:

  http://pypi.python.org/pypi/z3c.form


As always, the code is 100% test covered to ensure the highest quality
possible.

Enjoy!
-- 
Entrepreneur and Software Geek
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Question about README.txt files

2009-05-05 Thread Stephan Richter
On Tuesday 05 May 2009, Kent Tenney wrote:
> I've considered the '>>>' prompt an interpreter prompt, so
> >>> write('file', """content""")
> always looked a bit magical to me.

But it is the interpreter prompt. The idea is that you can copy an interpreter 
session into a doctest and it will just work.

> >>> import dtglobals
>
> where dtglobals would expose all the good
> !magic, without requiring the test scaffolding.

That would be truly a lot of magic. I think it should be more something like: 

from fsutil import * 

But anyways, putting stuff in globs is used for lots of doctests, so you might 
as well get used to that.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Question about README.txt files

2009-05-04 Thread Stephan Richter
On Monday 04 May 2009, Kent Tenney wrote:
> So the magic in *.txt is ad-hoc for each package?

It is not magic. The API for adding additional global variables in the test 
setup is well documented and used all the time. But yes, each doctest file 
can have a different set of global variables.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Question about README.txt files

2009-05-04 Thread Stephan Richter
On Monday 04 May 2009, Kent Tenney wrote:
> Where do the helpers like ls, cat and write live?
>
> >>> ls(sample_buildout)
> >>> cat(sample_buildout, 'buildout.cfg')
> >>> write(sample_buildout, 'recipes', 'mkdir.py',

Usually in tests.py or tests/test_*.py. They are added to the globals that are 
available in the test. 

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Attempting to use z3c.rml properly...

2009-04-28 Thread Stephan Richter
On Wednesday 22 April 2009, Chris Withers wrote:
> Roger Ineichen wrote:
> >> I've given up on using z3c.rml (or indeed reportab's open-source
> >> software) with Google's AppEngine as the restrictions they
> >> were too constraining.
>
> It's interesting to see z3c.rml knocking around. I've often questioned
> the legal existence of z3c.rml. As far as I remember, RML forms part of
> the commercial stuff that ReportLab (the company) offers and I'm not
> sure even the spec of the xml and/or the name RML are available for use
> without talking to ReportLab first...
>
> Anyway, just thought I'd mention it as legality is something people
> should take into account even in the open source world ;-)

There are no legal issues. Andy and I always communicated about me writing 
z3c.rml. The reason ReportLab, the company, was so upset with the tinyRML 
author was because the author did not properly credit ReportLab as the 
underlying PDF generation library. z3c.rml gave credit were credit was due.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form: LookupErrors

2009-04-08 Thread Stephan Richter
On Wednesday 08 April 2009, Martin Aspeli wrote:
> Would you mind making a 1.9 maintenance branch and, 

Done.

> if we fix a few bugs, could you release 1.9.1 soonishly.

Yes. Please forward new fixes to the trunk as well.

Thanks!

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form: LookupErrors

2009-04-08 Thread Stephan Richter
On Wednesday 08 April 2009, Martin Aspeli wrote:
> What I'd like to see:
>
>   1) z3c.form catches the LookupError and treats it as a valdiation
> error (even on first render of the form), not a fatal error
>
>   2) z3c.form defaults to missing_value if there is a LookupError
> against what the data manager returns. The value is indeed "missing in
> action"
>
>   3) If possible, we output the offending value in the error message
>
>   4) In use cases where it makes sense, people can use a field property
> implementation that checks the source and returns the default (or
> something else) if the value can't be found. That's not for z3c.form
> to decide or depend on though.

Sounds good.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Rotating z3.log

2009-04-07 Thread Stephan Richter
On Tuesday 07 April 2009, andrew wrote:
> Does anyone know of a straightforward way of setting up a Zope3 instance
> to rotate z3.log ? At the moment I have one big file but this is not
> great for backups. I suppose I could use logrotate (and will have to if
> there's no Zope solution), but from a cursory dig into ZConfig it looks
> like it should be possible.


  
path access.log
max-size 50MB
old-files 5
  


There are more options, but that's what I use.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form: LookupErrors

2009-04-07 Thread Stephan Richter
On Tuesday 07 April 2009, Roger Ineichen wrote:
> > It'd be nicer if z3c.form would catch the error and return
> > field.missing_value or something like that. As it stands, if
> > this happens with a content object, it's impossible to reach
> > the edit form and fix the value!
>
> This is a legacy data problem. Such data need to get migrated
> by a generation if a value is no longer valid.

No, it is not. The legacy data problem is a special case.

What if your list of choices depends on constantly changing data? For example, 
a widget allows you to select a user from a userfolder. Later the user gets 
deleted. Just because you selected the user before, the form should not fail.

I totally agree with Martin that we should use missing_value in those cases.

I think this could actually be considered a fairly serious bug.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form: LookupErrors

2009-04-07 Thread Stephan Richter
On Tuesday 07 April 2009, Martin Aspeli wrote:
> It'd be nicer if z3c.form would catch the error and return
> field.missing_value or something like that. As it stands, if this
> happens with a content object, it's impossible to reach the edit form
> and fix the value!

I agree.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] ImportError: No module named viewlet.interfaces !!

2009-04-06 Thread Stephan Richter
On Monday 06 April 2009, Chetan Kumar wrote:
> This is a surprising output from ./bin/paster serve debug.ini
> KGS 3.4.0 with zope.viewlet-3.4.2-py2.5.egg installed alright in it usual
> place.
>
> Portion of the Error
> Message File
> "/home/zope3/Work/z3w/nx/src/nx/skin/interfaces.py", line 1, in 
> from zope.viewlet.interfaces import IViewletManager
> zope.configuration.xmlconfig.ZopeXMLConfigurationError: File
> "/home/zope3/Work/z3w/nx/site.zcml", line 4.2-4.26
>     ZopeXMLConfigurationError: File
> "/home/zope3/Work/z3w/nx/src/nx/configure.zcml", line 60.0-60.27
>     ZopeXMLConfigurationError: File
> "/home/zope3/Work/z3w/nx/src/nx/skin/configure.zcml", line 5.2-9.3
>     ImportError: No module named viewlet.interfaces
> Portion of the Error
> Message----

For some reason that smells like a circular import problem,

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Unknown directive: class !!!

2009-04-04 Thread Stephan Richter
On Saturday 04 April 2009, Andreas Jung wrote:
> Never heard or seen a zcml 'class' tag. Do you mean 'content'?

There is a class directive. Sounds to me like the meta ZCML directive is 
missing.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] test writing with z3c.testsetup

2009-03-17 Thread Stephan Richter
On Tuesday 17 March 2009, Simon Elbaz wrote:
> It is maybe the download list http://download.zope.org/distribution/ that
> is not up to date.

We should just remove this directory. Is there still anything useful there?

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Astonishing Error: "Import Error: No module named interfacce"

2009-02-04 Thread Stephan Richter
On Wednesday 04 February 2009, Massimiliano della Rovere wrote:
> Can you all help me, please? What could be the cause of such an error?

I'd say it is a 99% probability that it is a circular import.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] [RFC] Merging zope3-users list with z...@zope.org list

2009-01-15 Thread Stephan Richter
On Thursday 15 January 2009, Andreas Jung wrote:
> Thoughts?

-1. I frequently delete E-mails from z...@zope.org but usually read carefully 
the zope3-u...@zope.org list. It would significantly increase my ability to 
filter the different mails and thus decrease my time to respond.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Is zope3 dead?

2009-01-05 Thread Stephan Richter
On Tuesday 23 December 2008, Alek wrote:
> Anyway, still both the list traffic and wiki traffic seem to be much lower
> than eg. one year ago.

btw, I got roughly 550 check-in E-mails in the last 3 weeks. Not too bad.

>  I'm glad the development goes on, but publishing info about new releases
> of Known Good Sets would be nice - otherwise the 1sttimers (or people like
> me, who haven't worked with zope for some time) don't know about that \

I am working on it. :-) I planned to do some work during the holidays, but 
family obligations prohibitted me to do so.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] resource-directories

2008-12-02 Thread Stephan Richter
On Tuesday 02 December 2008, Frank Burkhardt wrote:
> 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.

I did something like this in z3c.versionedresource, so you can look there.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form / extjs

2008-11-19 Thread Stephan Richter
On Wednesday 19 November 2008, Laurent Mignon wrote:
> That could thus allow those having developed modules integrating zope3 /
> z3c.form / ... and extjs to publish and maintain the code in the Zope
> Repository. In the same time, it would be then again possible to
> collaborate in their development.

Yes, in fact Keas will publish a package called z3c.formext soon, which 
tightly integrates z3c.form with ExtJS.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form / extjs

2008-11-18 Thread Stephan Richter
On Monday 17 November 2008, Mignon, Laurent wrote:
> Following compatibility issues of licence, all the work related to
> integration between zope3 / z3c.form and extjs has been removed from the
> zope repository.
>
> Does some one say me if these developments were continued outside the zope
> repository and if they are publicly available.

This is not quiet correct. I have talked to the ExtJS guys and they have added 
the ZPL to the list of licenses on their list that have an "exception".

This means that we can maintain code in the Zope Repository that builds on top 
of ExtJS but we cannot check in the ExtJS code itself.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] 3.4 status, how can i help

2008-10-22 Thread Stephan Richter
On Wednesday 22 October 2008, Christophe Combelles wrote:
> Another hard(?) task will be to create the tarball version, because it was
> a promise, and some people will probably find it usefull.

No, this is really easy. :-) zope.release contains the necessary scripts to 
update the Zope 3 source tree. Marius has been doing that for one of his 
projects successfully.

For me there are two relatively small outstanding items:

1. Changelog generator. We need to be able to create a basic changelog from 
all the CHANGES.txt files of the packages. Kapil has started this and I have 
the beginnings of a script sitting in my inbox.

2. Improvements to the intro page of the KGS. I would like to have a nicer 
o-wrap, releases must be sorted in reverse order, changelog should be 
published, and the tar ball should be uploaded and linked as well.

Once this is in place, I am very glad to make the final release.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Issue with xmlrpc call to zope3 xmlrpc view hanging, until original call interupted.

2008-10-17 Thread Stephan Richter
On Thursday 16 October 2008, Tim Hoffman wrote:
> I have a view defined for xmlrpc (zope.app.publisher 3.5.0)  the same
> view is also defined for jsonrpc using z3c.jsonrpc

what version of zope.publisher do you use? We fixed a lockup problem due to 
missing headers when using twisted and I think paster. We are using version 
3.5.4.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout seems to be broken due to missing back35.py in zope.app.component.

2008-10-15 Thread Stephan Richter
On Wednesday 15 October 2008, Hermann Himmelbauer wrote:
> Ist there anything I can do about this?

You should really use the KGS. http://download.zope.org/zope3.4/intro.html

You can then override versions that you find preferable.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Looking for the Z3C tutorial?

2008-10-13 Thread Stephan Richter
On Thursday 09 October 2008, John de la Garza wrote:
> Is z3c.form replacing zope.formlib.form?

I think z3c.form has most traction right now. Also, the Plone community is 
starting to move completely towards z3c.form. It also has more documentation.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] formlib to z3c.form widget adapter/bridge

2008-08-28 Thread Stephan Richter
On Thursday 28 August 2008, Martin Aspeli wrote:
> Has anyone written or thought about an adapter/bridge between formlib
> and z3c.form widgets?

Not that I know of. But I think it might be hard to do due to the different 
definitions of what a widget and a field is. On the other hand, I might be 
wrong. If someone develops such a bridge, I would add it to z3c.form as an 
optional feature.

BTW, it would be a bridge from zope.app.form widgets to z3c.form ones. 
zope.formlib does not define its own widgets.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] [Zope-dev] Problems with schema Date field - year is truncated

2008-08-28 Thread Stephan Richter
On Thursday 28 August 2008, Hermann Himmelbauer wrote:
> Nevertheless, the validator does not check if someone enters a string that
> is too long, e.g. someone can enter "19.02.1999892839", whereas the
> trailing characters are truncated. Is there a way to prevent this, for
> instance by throwing an error? Or is there any reason for this?

Get the latest zope.i18n package. It fixes this problem.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form: Data Manager - getting value via dm.query() instead of dm.get()

2008-08-20 Thread Stephan Richter
On Wednesday 13 August 2008, Hermann Himmelbauer wrote:
> The problem is, that if the dictionary does not contain all fields, an
> error is raised. The reason for this error lies in line 97 in
> z3c.form.widget: The value is retrieved via the get() function (which does
> a dict.get()) and thus fails.

That is correct. My initial assumption was that a dictionary should define all 
available fields, much like we expect a class instance to have all attributes 
around.

> The solution for this problem would be to replace the datamanager.get() by
> datamanager.query(), as this would return the default field value.
> However, this may break other projects, therefore I would suggest to:
>
> - Introduce some form option such as "ContextQuery=True/False"
> - Either use dm.get() or .query() regarding to this option
>
> What's your opinion on this? Would this be a decent solution?

Looking at the code, I would change the call in widget.py line 97 to a query() 
call. There is another dm.get() call in the code that also would be changed. 
This feature could be added to the 1.9.0 release. Feel free to check in a 
patch.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.zrtresource not interpreting

2008-07-30 Thread Stephan Richter
On Wednesday 30 July 2008, Fernando Correa Neto wrote:
> Yeah it is. That's really strange.
> I am using the latest zopeproject to create basic skeleton and go from
> there. Is it possible that newest releases of some zope eggs would
> make ZRT not be called?

No.

> I mean, in what moment the processing takes place?

Like ZPTs, it is interpreted before being served. The language is a little 
finicky about syntax and does not do good reporting, because it matches 
regexes. Usually a syntax error in the in the zrt directive code is to blame.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.zrtresource not interpreting

2008-07-29 Thread Stephan Richter
On Tuesday 29 July 2008, Fernando Correa Neto wrote:
> Any ideas on how to make it work or debug?

Is the statement in one line. Unfortunately I did not make ZRT commands ignore 
newlines.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: AW: AW: [Zope3-Users] subform support for z3c.form

2008-07-17 Thread Stephan Richter
On Thursday 17 July 2008, garz wrote:
> a.) Do a standalone subform-package and have it all included in one place.

> b.) Do a complete integration with pagelet-patterned forms in z3c.form and
> have it on one place too, but having two variations of the same
> form-classes in one package, which might be confusing too.

-1

> c.) Do a partial integration in z3c.form package without the
> pagelet-patterned forms and create a z3c.subform-package that holds those
> forms separatly. Create pagelet-free subform-forms and include them in
> z3c.subform-module. Problem here is the already existing EditSubForm,
> regarding the already taken
> name that can be overtaken since backwards-compatibility should be an issue
> here (but maybe not, didnt thought about that).

BTW, I am not concerned with backward-compatibility as much as with a clean 
API.

> d.) Relaunch z3c.form and include pagelet-package, template-package,
> formui-package and subform-package, or just the last one.

I don't get this. Currently z3c.form does not depend on pagelets and I want it 
to stay this way. You can consider this an edict.

BTW, I am not trying to belittle your work. I think it is very interesting and 
the design goals are noble ones. If I would not like it, I would not bother 
to respond.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: AW: AW: [Zope3-Users] subform support for z3c.form

2008-07-17 Thread Stephan Richter
On Thursday 17 July 2008, garz wrote:
> 2.) Expand the z3c.form.form-forms but leave the pagelet-pattern, as it is
> implemented in the z3c.subform.form-forms, out. There wont be any
> backwards-compatibility issues, since z3c.subform only adds the
> "subFields"-Attribute and if that is keept empty, there wont be a
> "subForms"-Attribute neither and everything stays the same.

I had only time to quickly review the code, but I absolutely hate the idea of 
a "subFields" attribute. ;-) That just seems very hacky to me.

Having said that, I have not looked at the code carefully enough to see the 
motivation and see whether there is an alternative to that approach still 
fulfilling your original design goals.

BTW, have you looked at groups in z3c.form at all? They seem to come a little 
closer to what you are looking for, I think.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form - content add and edit forms

2008-07-16 Thread Stephan Richter
On Tuesday 15 July 2008, Martin Aspeli wrote:
> It's very common to have a content type that has both an add- and an
> edit form. If you have custom widget setup code and other logic, you
> often have to replicate this across both forms to make them consistent.

> Is there a standard/recommended z3c.form pattern to reduce duplication
> in this case?

Well, there is no framework way, but you can solve it via inheritance.

class ObjectForm(object):
  fields =...

  def updateWidgets(self):
...

class ObjectAddForm(ObjectForm, form.AddForm):
  pass

class ObjectEditForm(ObjectForm, form.EditForm):
  pass

I could also imagine that you could write a base class AddAndEditForm that has 
a mode with values ADD and EDIT that switches between the variances.

The difference between an add and edit form are only the button and their 
handlers and whether ignoreContext is set to true or false.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Checking for existence of an adapter

2008-07-15 Thread Stephan Richter
On Tuesday 15 July 2008, Martin Aspeli wrote:
> Specifically, I want to know if a particular view is registered for a
> particular type of context and request/layer, with a particular name.
> However, I don't have an instance of the object of that type, nor the
> request, at the time when I need to do the check.

Look at zope.app.apidoc. It has multiple APIs dealing with exactely your use 
case.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope Product Recommendations

2008-07-15 Thread Stephan Richter
On Monday 07 July 2008, Jon Hadley wrote:
> Does anyone have any recommendations in terms of usefulness / wow
> factor / day to day utility apps?

Try z3c.formdemo and z3c.formjsdemo. It is well-documented on how to get 
started with those.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Disabling authentication for resources

2008-07-09 Thread Stephan Richter
On Tuesday 08 July 2008, andrew wrote:
> I've got a web application that uses pluggable authentication, but I
> don't want the overhead of authentication for public resources like CSS,
> javascript, images, etc. Is it possible to just disable authentication
> for a given resource ? I tried just setting the permission to zope.View,
> but that didn't seem to make any difference.

You have to set the permission to zope.Public. It is a special permission 
that, when seen, bypasses the security context lookup.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: A slew of z3c.form questions

2008-07-06 Thread Stephan Richter
On Sunday 06 July 2008, Martin Aspeli wrote:
> I'm guessing z3c.form groups do that, of course, but it's not clear to
> me whether it's appropriate to use them for this kind of thing,
> especially since the logical groupings and field ordering will only be
> calculable at runtime.

Groups were written to support your use case specifically. I think they even 
put fieldset tags around each group, but I would have to check the template.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Getting zope.publisher to log errors

2008-07-01 Thread Stephan Richter
On Tuesday 01 July 2008, Philipp von Weitershausen wrote:
>  It also has some code to log to a logger, I think.

Except that by default logging to zlog is turned off. :-( We just created out 
own global and root error reporting utility to turn this on by default. (BTW, 
I think this should be the package default too.)

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] is it possible to copy object b/w two zodb Database

2008-06-11 Thread Stephan Richter
On Wednesday 11 June 2008, Jim Fulton wrote:
> > Stupid question: Which one? I tried straight xmlpickle and got some  
> > errors
> > randomly.
>
> I was referring to the binary export/import, which is the only one  
> supported by ZODB, afaik, although it's been a very long time since I  
> looked at that code.

Where is the code? I could nto find anything quickly?

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] is it possible to copy object b/w two zodb Database

2008-06-11 Thread Stephan Richter
On Wednesday 11 June 2008, Jim Fulton wrote:
> On Jun 11, 2008, at 10:36 AM, rahul bhaskar wrote:
> > Hi,
> > I am facing some problem with merging two zodb file.
> > is it possible to open two zodb Database at a time and copy object
> > from one to another.
>
> Yes, using the export/import mechanism.

Stupid question: Which one? I tried straight xmlpickle and got some errors 
randomly.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zope.i18n.locales and currency

2008-05-23 Thread Stephan Richter
On Friday 23 May 2008, Christian Theune wrote:
> > That's more or less what I've been doing. I looked extensively, but
> > couldn't find a better way. (or even any documentation)
>
> What I understand is that  "¤" is a symbol that would be replaced by the
> `correct` sign/character/string during translation for a given language and
> currency. I haven't seen it working myself though.

A bug that is oin my backlog since years. :-( It would be a very easy fix for 
someone to do though.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope user web authentication module?

2008-05-15 Thread Stephan Richter
On Friday 14 March 2008, Andrew Gryaznov wrote:
> Is there any user authentication module like that I used form Plone in Zope
> 2?
> Like a ready 'skinnable' zope product that will draw login form,
> authenticate, manage captchas/registration with post-init scripting and
> remind user passwords?

No, sorry. It would make a great contribution though. ;-)

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Buildout: apidoc.

2008-05-15 Thread Stephan Richter
On Sunday 16 March 2008, astoon wrote:
> I'm trying to configure buildout for use apidoc, but when I visit
> 127.0.0.1:8080/++apidoc++ then get the following page:
> `Unauthorized
> You are not authorized
> User: Manager `

Can you provide more trace information, so that we can see which permission 
failed and what was tried to be accessed.

Otherwise your setup looks good from quickly reading over it.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How can I find all Local Registries (Sites)

2008-05-15 Thread Stephan Richter
On Tuesday 06 May 2008, kevin gill wrote:
> How can I find all Local Registries (Sites)?

You cannot easily do this, since it is hierarchical. You have two options:

1. Traverse through the object tree finding them one by one.

2. Create a catalog that indexes all sites.

> I have a simple local utility that I need to register with a global
> utility when bootstrapping the application.

For some reason this sounds like a bad idea.

> I can find my global utility since it is in the global site manager.
>
> I registered my sites with the base local registry. I tried using the
> IDatabaseOpenedEvent and opening the database and getting the Application
> object and the root local registry. However, the local utilities I
> instantiate  believe that they are in the global Registry.

I do not understand this paragraph.

> There is also a problem deleting a site which registered itself with a
> parent.

That would be expected. I believe the base registry add/remove code shows how 
to correctly unregister sites before deletion.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] different traversing for different users

2008-05-15 Thread Stephan Richter
On Thursday 10 April 2008, garz wrote:
> why isnt that already supported? if i want to enable skin support like in
> phpbb, such an option is needed anyways, isnt it?

At some point I wrote a demo on how to use the zope.app.preference package to 
change the skin based on the user. It was not that hard and did not require 
any special zope publication. Once you authenticate the user, a 
PrincipalCreated event is sent out. You simply write a subscriber to that 
event that looks up the skin and then simply calls applySkin(request, mySkin) 
and you are done.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] the lost tiks.org?

2008-05-15 Thread Stephan Richter
On Monday 21 April 2008, Junyong Pan wrote:
> Anyone can tell me how to download the source code?

Contact Roger Ineichen at [EMAIL PROTECTED]

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] missing some tabs in the ZMI

2008-05-15 Thread Stephan Richter
On Wednesday 30 April 2008, Marius Gedminas wrote:
> The Interface Browser was retired in favour of APIDoc, I think.  I don't
> remember the Tasks or Services tabs, but services as a concept were
> removed a while ago, in the great component architecture simplification.
> Now we have only adapters and utilities.

They are gone since Zope 3.1. :-)

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] cant register object via zmi

2008-05-15 Thread Stephan Richter
On Wednesday 16 April 2008, garz wrote:
> i cant register the following class through the zmi.

I do not understand what "can't register through ZMI" means here. With the 
Python snippet below you cannot do anything in the ZMI of course. You 
certainly need to have more ZCML or similar code.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: AW: [Zope3-Users] efficiency of PAU authentication

2008-05-15 Thread Stephan Richter
On Tuesday 29 April 2008, nixon wrote:
> in app.publication.zopepublication.py there are 2 methods.
> Maybe they are invoked in different scenarios, I am not sure.
> But at least one PAU auth for each request.
>
>     def callTraversalHooks(self, request, ob):
>         # Call __before_publishing_traverse__ hooks
>         notify(BeforeTraverseEvent(ob, request))
>         # This is also a handy place to try and authenticate.
>         self._maybePlacefullyAuthenticate(request, ob)
>
>     def afterTraversal(self, request, ob):
>         #recordMetaData(object, request)
>         self._maybePlacefullyAuthenticate(request, ob)

callTraverslHooks is called after any new object has been traversed in the 
traversal process. See zope.publisher.base.BaseRequest.traverse. 
afterTraversal is called in zope.publisher.publish.publish after all 
traversal is done. So yes, you would see multiple attempts to authenticate. 
Zope cannot guess that you end up at the same place.

As Roger suggestedm some caching might be good, if the credentials 
verification is expensive.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to set "content-coding" for a browser resource?

2008-05-15 Thread Stephan Richter
On Sunday 04 May 2008, nixon wrote:
> I configured a reource folder, in which I dropped a gzipped javascript
> file. When fetching from server, it seems not to be unzipped.
> Is it possible to configure the content-coding for such static resource
> response? Or must I do it like a normal view?

I am pretty sure the default resource is pretty ignorant about compressed 
content. You can always write your own resource, like this::

  class ZippedResource(SomeBaseResource):
  filename = None
  ...

  ZippedJQuery = type('ZippedJQuery', (ZippedResource,),
  {'filename': 'jquery.js.zip'})

and in ZCML:

  

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Urgent: What to do with ZODB.FileStorage.FileStorage.CorruptedTransactionError

2008-05-15 Thread Stephan Richter
On Monday 28 April 2008, Fet Biz wrote:
> Yes, I has known that I got the Error.
> But What to do with it? (And Why?)

There are several tools that help with cleaning up a corrupted ZODB 
FileStorage.

Looking at the code briefly, I can see that if you call read_index with the 
option "recover=True", you should get a cleaned up file storage. Looking at 
the code further, you should be able to say:

from ZODB.FileStorage import FileStorage
FileStorage.recover('path/to/Data.fs')

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How do I submit an update to zope translation?

2008-05-15 Thread Stephan Richter
On Sunday 04 May 2008, Yuan HOng wrote:
> If I find the current translation in zope.app.locales not
> satisfactory, how can I submit an update?
>
> In particular, I find a bug in the Chinese (zh_CN) translation which
> causes the sizes of content objects not displayed in the rotterdam
> skin. Following is the fix, hope someone can commit it.

The translations used to be managed by launchpad. I do not know what happened 
with that, since I never used the system. From my point of view, you can 
simply check in your fixes to the zope.app.locales package.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] XML schema definitions,zope.schema and z3c.form

2008-05-15 Thread Stephan Richter
On Tuesday 06 May 2008, Nylan wrote:
> I've found this solution(supports only simple elements at root level):
> http://blogs.nuxeo.com/sections/blogs/julien_anguenot/2005_08_19_xml-schema
>-support-on
>
> Are there other solutions, besides the link above, I haven't found/noticed?
> Something able to manage more complex types?

There was a zope.xmlschema or so package at some point, but we deleted it. You 
would probably need to resurrect it again and extend it for more complex 
object types. I do not think it would take too much effort to complete this 
task,

Once you have a schema, life is simple, of course. :-)


Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


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

2008-05-15 Thread Stephan Richter
On Sunday 23 March 2008, Fernando Correa Neto wrote:
> This way I can simply use widget/@@hint and it works.
> Am I abusing here? I am interested on how it would be accomplished
> with a traversal adapter.

Looks okay. You only have to be aware thata the "hint" page could possibly be 
available in the URL as well, if you expose a widget via a URL. But that's 
probably the right way to do it.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How do I set up layers for functional testing

2008-04-22 Thread Stephan Richter
On Tuesday 22 April 2008, kevin gill wrote:
> How do I functional test my z3c.forms views (in this scenario)?

Due to a lack of time, I am not able to respond to your specific questions. 
But I can give you a hint. z3c.formdemo has functional tests. :-)

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c.form query widget

2008-04-11 Thread Stephan Richter
On Friday 11 April 2008, Fernando Correa Neto wrote:
> This is a port of z3c.widget.namespace which was created for
> zope.formlib but I needed to port it so I could use it in z3c.form.
> And yes, this is a widget traverser so you can use it like:
>
> http://localhost:8080/your_z3c.form/++widget++name/whatever_method.

That would be great. I would prefer the package to be 
called "z3c.formwidget.traversable".

> Pretty usefull for Ajax forms though. In fact, if I add this package
> to z3c.formwidget, It should be really straightforward to port
> z3c.widget.autocomplete as well. So in the end, 2 more usable widgets
> for z3c.form.

That would be great to have.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


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

2008-02-20 Thread 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)?

These are good questions. We started already collecting the schema fields in 
z3c.schema. So I think z3c.formwidget should only contain the widgets and 
converters.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


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

2008-02-20 Thread Stephan Richter
On Wednesday 20 February 2008, Hermann Himmelbauer wrote:
> 1.3) From an object attribute (don't really understand what this Step is
> for): Seems also not possible as there's once again no way to register a
> named adapter here and therefore the absence of "value1" as object
> attribute will lead to an error:
>
> adapter = zope.component.queryMultiAdapter(
>                 (self.context, self.request, self.form, self.field, self),
>                 interfaces.IValue, name='default')

You almost got it. This is the approach that I envisioned. You basically have 
to provide this adapter to provide a default value. From 
z3c.formdemo.message.browser, line 27:

DefaultDate = widget.ComputedWidgetAttribute(
lambda adapter: datetime.date.today(),
field=interfaces.IHelloWorld['when'], view=IAddForm)

Then register the adapter as follows:

  


You can create any function you like to compute the dynamic default value. The 
`adapter` argument has access to the context, request, form, etc.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


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

2008-02-20 Thread Stephan Richter
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 is appropriate for an add/edit form
> but may not be appropriate for a search form.
>
> If I change the "required" flag on the field level, e.g. in the update()
> method, the change is permanent in the interface, which is not appropriate.
> And changing it on the widget level seems to be very complicated, at least,
> I found no way to do it.

Mhh, I think that form fields should support this. Let me look at the code 
briefly.

So yes, you need to change it on the widget level; here is what you have to do 
in your form:

class MyForm(Form):

  def updateWidgets(self):
super(MyForm, self).updateWidgets()
self.widgets['prefix.myfield'].required = False

Is that too difficult still?

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: Error in testbrowser documentation

2008-02-14 Thread Stephan Richter
On Thursday 14 February 2008, Marius Gedminas wrote:
> Browser was last modified in rev 71429, IBrowser was last modified in
> rev 40065.  I guess the person who added the index argument forgot to
> update the interface definition.

That was me. :-)

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


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

2008-02-09 Thread Stephan Richter
On Friday 08 February 2008, Hermann Himmelbauer wrote:
> 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 are needing -
> such as the PasswordConfirmationWidget. Or, in my case I need a
> special "Email" field, that inherits from TextLine and may also have some
> specific widget.

Why would you need a special widget for E-mail? You need a special field and 
maybe a special validator, if your field does not provide a sufficient 
validate() method.

> So I'd suggest to open some repository, e.g. "z3c.formwidgets" where people
> can contribute their fields/widgets so that they can be reused by others.
> Moreover, this would also be a good entry point for people developing new
> widgets.

+1. Let's call it "z3c.formwidget" (singular).

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


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

2008-02-09 Thread Stephan Richter
On Friday 08 February 2008, Roger Ineichen wrote:
> what do you think should we start something like
> z3c.formwidget.(xy) for new z3c.form widgets? You know
> we also can port some widgets form our other projects then.

Yes, I think it is time to start a new package for additional widgets. 
z3c.formwidget sounds good to me.

> My personal favorit for a password widget is an additional
> schema which defines a confirmation field and uses this schema
> and will setup the widgets explicit. The reason for this
> is that the form concept 100% fits the requirements and this
> can be done without any magic because Invariant is supported.
> Also note that the same password widget is not allways used
> within a confirmation field if it comes to login.
> Here is some code:

After reading your arguments a couple of times, I agree that your approach is 
better. It should be done this way.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


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

2008-02-08 Thread Stephan Richter
On Friday 08 February 2008, Hermann Himmelbauer wrote:
> What's your opinion on this, Stephan?

One important design goal for z3c.form is not to be JS dependent. This is what 
we developed z3c.formjs for. 

Also, remember that a widget is something different in z3c.form. Taking the 
E-mail widget example, we still only have a TextFieldWidget but might have a 
specific EMailValidator registered for this widget.

From this point of view, I think it would be cool, if we could have a 
ConfirmationWidget, which simply displays another widget twice. This 
could then either be a PasswordWidget or TextFieldWidget. The cool part about 
it is that the constructor of the confirmation widget could be smart to take 
the passed in field into account.

So here is how I would like this to look:

class ConfirmationWidget(...)

   widget = None # The widget that we want to display twice.

   ...

def FieldConfirmationWidget(field, request):
widget = FieldWidget(field, ConfirmationWidget(request))
widget.widget = zope.component.getMultiAdapter(
(field, request), IFieldWidget)
return widget

The challenge is to have unique names for the widget and its confirmation and 
do all the updating correctly. You probably also need a custom validator that 
first compares the two values to be equal and then forwards the validation.

I would love to see this widget in z3c.form. Of course, I am also still 
waiting for the ObjectWidget. :-)

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


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

2008-02-07 Thread 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 implement a PasswordConfirmationWidget. Then you have a 
special converter that throws an error, if the passwords do not match.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] using zope.testing's testrunner outside of zope

2008-02-04 Thread Stephan Richter
On Monday 04 February 2008, Chris Withers wrote:
> > [test]
> > recipe = zc.recipe.testrunner
> > eggs = zope.kgs [test]
>
> Ah, okay, so what actually is zc.recipe.testrunner?
> I thought the testrunner was in zope.testing.testrunner...

The recipe only makes sure that a "test" script is created that has all the 
right sys.path entries and some options to make sure that only the tests in 
the specified eggs (in this case zope.kgs) are run.

> I feel like I'm missing a lot here, is there documentation I can read to
> catch up on this?

I think the documentation that comes with zc.buildout is nice. But I started 
with Jim's PyCon tutorial slides. 

http://svn.zope.org/zc.buildout/trunk/doc/tutorial.txt?rev=82275&view=auto

> Ah, okay... so I only need to worry about extras_require if I want to
> support buildout?

Yes. But note that the name "test" is just a convention of naming the test 
requirements. The string in the square brackets is the name of the extras to 
be installed.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: z3c.form install problem?

2008-02-02 Thread Stephan Richter
On Sunday 16 September 2007, Philipp von Weitershausen wrote:
> a) stay on Zope 3.3 and *don't* install z3c.form via setuptools. Simply
> copy the package to $INSTANCE/lib/python. That requires, of course, that
> z3c.form actually works on Zope 3.3.

Yes, z3c.form is compatible with Zope 3.3. Though I suggest switching to Zope 
3.4, since we usually do not test against Zope 3.3 anymore.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] how to use invariant/validator? (z3c.form=1.6 and z3c.formui=1.3)

2008-02-02 Thread Stephan Richter
On Friday 21 September 2007, Kai Krackler wrote:
>    - __traceback_info__: ( 0x2b2d6e6af440>, 'widget', ['label']) TypeError: tuple indices must be
> integers

Does this error still happen with z3c.form 1.8?

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to go further?

2008-02-02 Thread Stephan Richter
On Sunday 23 September 2007, Simon wrote:
> Could someone tell me for example how to integrate Fckeditor to it?
>
> I just know that in my interfaces.py I need to do
>
> from zope.html.field import XhtmlFragment
>
> and then in "description" I need to do change Text in XhtmlFragment

This does not make sense.

> Is there some more advanced book than the one of Phil???

Well, a book is always secondary writing. We have a lot of primary 
documentation in doctests.

> Is there more documentation somewhere else???

Yes, there is. The zope.html package comes with several documentation files:

http://svn.zope.org/zope.html/trunk/src/zope/html/README.txt?rev=69548&view=auto
http://svn.zope.org/zope.html/trunk/src/zope/html/browser.txt?rev=69548&view=auto
http://svn.zope.org/zope.html/trunk/src/zope/html/docinfo.txt?rev=81422&view=auto
http://svn.zope.org/zope.html/trunk/src/zope/html/widget.txt?rev=70761&view=markup

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Trouble installing DocumentLibrary

2008-02-02 Thread Stephan Richter
On Friday 21 September 2007, John Goerzen wrote:
>               ConfigurationError: ('Unknown directive',
>               u'http://namespaces.zope.org/browser', u'layer')
>
> Does anyone have any idea how to fix this?

You do not seem to load the most fundamental browser directives. You must 
include the meta.zcml file from zope.app.publisher (I believe) somewhere.

You should contact Infrae to help you out with this particular problem.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zope.formlib doesn't check invariants on subschemas - need workaround

2008-02-02 Thread Stephan Richter
On Saturday 02 February 2008, Derek Richardson wrote:
> After help from Philipp and some investigation, I determined that the
> problem is that schema B isn't itself the main form, but is nested
> within schema A as the value_type of a Tuple field. When schema A is
> validated, schema B's invariant is not checked. I think this may be a
> bug. If someone more knowledgeable will confirm, then I will open a bug
> report.

I would not consider this a bug. I would not expect it to work this way. But 
then I also think that the generic Object field is evil, though I am 
sometimes sucked into believing it is not. So I guess the way to fix it would 
be to check the invariants within the validation method of the Object field.

> In the mean time, I need a workaround that verifies that the invariants
> on all instances of schema B in the Tuple on schema A hold during form
> validation. My nascent idea is to put an invariant on schema A that
> checks all the invariants on all schema B instances. However, I am not
> familiar enough with formlib internals to code this up without
> significant research. Can someone help me out with an implementation for
> this workaround or an idea for a different, better workaround?

Yep, that workaround work, but the error message does not appear in the right 
location. I do not use formlib, so I cannot help with an implementation 
either.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] using zope.testing's testrunner outside of zope

2008-02-02 Thread Stephan Richter
On Friday 01 February 2008, Chris Withers wrote:
> Stephan Richter wrote:
> > If you use buildout, there is a recipe for creating a test runner. See
> >
> > http://svn.zope.org/zope.kgs/trunk/?rev=83325
> >
> > for a good example.
>
> Where's the actual test runner or test runner creater?

[test]
recipe = zc.recipe.testrunner
eggs = zope.kgs [test]

> >> Also, what's the best way to indicate in setup.py that my package needs
> >> zope.testing for the tests?
> >
> > There is a "test" option, where you can list all packages that should be
> > installed for testing. See
> >
> > http://svn.zope.org/zope.component/trunk/setup.py?rev=81358&view=auto
>
> What's the difference between tests_require and extras_require['test']?

"tests_require" contains a list of test dependencies that setuptools uses for 
its integrated test support. Unfortunately, this lsit is not exposed, so 
buildout cannot use it. So instead, we use "extras_require['test']" to 
provide that same list.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Re: [Zope-dev] Zope 3.4.0 candidate 1 Released

2008-02-01 Thread Stephan Richter
On Friday 01 February 2008, Martijn Faassen wrote:
> http://www.openplans.org/projects/zorg-redux

This project does not seem to be public.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope-dev] Re: Zope 3.4.0 candidate 1 Released

2008-02-01 Thread Stephan Richter
On Friday 01 February 2008, Tres Seaver wrote:
> > I typed four more paragraphs full of markety stuff here but deleted them.
> >  It's not useful.  If no one else thinks it's a good idea, I'm not going
> > to push either.
>
> I would favor the following for a roadmap going forward:
>
>  - No more tarball releases, period.  Nobody should expect to get
>    another one, or even anything other than a "critical security fix"
>    3.4.1 tarball.  The path for maintenance going forward is going
>    to be to release individual eggs with bugfixes, new features, etc.

You can only do this, if you have a migration story. We do not have one yet. 
We do not even have a recommended way of doing eggs-based development. Right 
now you can use zopeproject or build your own setup. Various recipes provide 
multiple ways of doing that.

>  - Somebody *might* release a meta-egg which would serve the same
>    purpose as the current Zope3 tarball release:  it would pull in all
>    the other eggs from the KGS needed to get a "ZMI" up and running.
>    That egg should *not* be called "Zope3":  it might be called
>    "z3c.zmi", or some such.  There might even be multiple such packages
>    (e.g., one which configures one or more of the example application).

This does not fulfill the same use cases as the tar ball release. Look at the 
story we have for the tar ball. Install it, create an instance, develop using 
the instance. The meta-egg does not fulfill that story.

>  - We should fix up our "smoke test" story so that we can do large-scale
>    integration tests of something resembling the current tarball
>    release:  this is probably just a buildout, which pulls in all the
>    eggs in the KGS, runs all their unit and functional tests in the
>    integrated environment, and perhaps runs some additional functional
>    / system tests.  Note that I am not proposing to release this beast:
>    it exists primarily to enable testing.

I do this already all the time. How else would I know whether the KGS is 
stable?

svn co svn+ssh://svn.zope.org/repos/main/zope.release/branches/3.4 release
cd release
py24 bootstrap.py
./bin/buildout -N
./bin/generate-buildout
cd test
py24 ../bootstrap.py
./bin/buildout
./bin/test -vpc1

>  - Outside applications such as SchoolTool, which currently depend
>    on a released 'zope3", should begin to move their dependencies to
>    the "meta-egg"-based scheme outlined above:  in fact, they are
>    probably good candidates for defining such a meta-egg.

Well, ST is already eggified. But they still need a release, so the Ubuntu 
guys will take the initiative to create the packages.

Also, before this can be done, you got to document the process.

>  - Deployments which need non-egg-based packaging will need to figure
>    out how to use the dependency information in the target meta-egg to
>    stitch together their own packages.

Well, zc.sourcerelease is the recipe we want. But it also needs work to get it 
going.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope-dev] Zope 3.4.0 candidate 1 Released

2008-02-01 Thread Stephan Richter
Not responding to anyone in particular:

I see there are plenty people with opinions. I would love not to do the Zope 3 
releases anymore! I am tired of the endless discussions.

Think I am frustrated? Absolutely!

All the suggestions made here require more work, more manpower. But there is 
nobody doing the work. In fact, I am not even officially the release manager 
anymore. Remember, other people took over that job, because they wanted to do 
a release every 6 months? I said back then: Forget it. Nobody believed me and 
now it has been almost a year since the 3.3.1 release. The only reason I am 
doing the releases is to tell the world that we are still out there, 
improving the framework. And Tom/SchoolTool is the perfect example why this 
has to be done.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope-dev] Zope 3.4.0 candidate 1 Released

2008-02-01 Thread Stephan Richter
On Friday 01 February 2008, Jim Fulton wrote:
> - I think the goal of these releases is less to provide an application  
> than to provide a possibly useful collection of some libraries.  This  
> is similar to the Python standard library.  Some people see  
> significant value in this.  I believe that other web frameworks, like  
> TurboGears, also make releases that assemble a bunch of eggs, so  
> people can use their frameworks without having to download eggs from  
> PyPI.

Yes, and I consider this done as soon as I upload a versioned KGS file. Maybe 
making an announcement as well.

The problem right now is that we have not even told people about the eggs or 
the KGS (many will not pay attention until Zope 3.4.0 final). Nor do we have 
a transition story. Nor do we have a cohesive "how to use eggs" story and 
documentation.

Many people still customize the Rotterdam skin to build applications in Zope 
3!

> - The new approach to making a release would be to create an egg-based  
> release, probably building on zc.sourcerelease.

As you know, I am in favor of this approach. But it will take someone to 
figure out how to do it, write a few scripts and provide a transition to this 
way of doing it.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Re: [Zope-dev] Zope 3.4.0 candidate 1 Released

2008-02-01 Thread Stephan Richter
On Friday 01 February 2008, Chris McDonough wrote:
> If there will continue to be a release schedule for "Zope 3, the appserver"
> It would reduce confusion to new users greatly to give the appserver
> release a name other than Zope.

Well, we had to do the classic Zope 3 release at least one more time. Because 
the official story is still: Download the Zope 3.3 tar ball and start using 
it. We have to use at least one release to tell people that we are going to 
change the process and allow them still both methods.

I also think that we have no solid story and/or documentation to promote the 
new approach. My hope is that the story and documentation will develop during 
the next release cycles.

All I am doing is doing something about a pretty pathetic situation. I took 
the least oath of resistance.

And I am particularly tired of name change suggestions! For many reasons.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Zope 3.4.0 candidate 1 Released

2008-01-31 Thread Stephan Richter
January 31, 2008 - The Zope 3 development team announces the Zope
3.4.0c1 release.

This release is the first release candidate for Zope 3.4.0. It was preceeded
by an early beta 2 release back in November, 2007.

Zope 3.4 introduces support for binary large objects in the ZODB, and provides
a new postprocessing hook for publishing results. Many of the packages also
provide small feature improvements that are too numerous to list at this
point.


Packages and Eggs
-

Since the first Zope 3.4 alpha and beta releases, we have finished the
transition to a completely egg-based system. This largely means that most Zope
3 developers do not use the classic Zope 3 tar ball release anymore. However,
for your convenience, the Zope 3 developers will provide the classic Zope 3
tar ball releases for at least the 3.4 series and probably for 3.5 as well.

So how are Zope 3 applications built using only eggs?

The Known Good Set (KGS)


The known good set -- or in short KGS -- is a package index that derives from
the official Python Package Index (PyPI) and thus contains all available
packages in the Python world. But for a controlled set of packages, only
certain versions that are known to work together are available. The list of
controlled packages and their versions for Zope 3.4 can be found at the index
page [1]_.

The index can be used in several ways -- described here for `buildout`-based
projects. The easiest method is to specify the index option in your
``buildout.cfg`` file::

  [buildout]
  index = http://download.zope.org/zope3.4
  ...

You can also "nail" the versions by downloading the versions [2]_ and insert
them as follows:

  [buildout]
  versions = versions
  ...

  [versions]
  zope.interface = 3.4.0
  ...


``zopeproject`` Project Builder
~~~

Philipp von Weitershausen has developed a package called `zopeproject` to
quickly setup the boilerplate for any Zope 3 based project. Ample
documentation is provided at the `zopeproject` home page [3]_. `zopeproject`
uses Paste or ZDaemon to create a working server. Here are the necessary
commands to get a project started::

  $ easy_install zopeproject
  $ zopeproject HelloWorld
  $ cd HelloWorld
  $ bin/helloworld-ctl foreground


Demo Packages
~

At this point, there is no demo package demonstrating a simple Zope 3
application setup. (I hope one gets developed before Zope 3.4.0 final.)
However, the ``z3c.formdemo`` package can be used as a fairly minimal
setup. To get started with it, do the following::

  $ svn co svn://svn.zope.org/repos/main/z3c.formdemo/tags/1.5.1 formdemo
  $ cd formdemo
  $ python bootstrap.py
  $ ./bin/buildout -v
  $ ./bin/demo fg


.. [1] http://download.zope.org/zope3.4/controlled-packages.cfg

.. [2] http://download.zope.org/zope3.4/versions.cfg

.. [3] http://pypi.python.org/pypi/zopeproject


What is Zope 3?
---

Zope 3 is a web application server that continues to build on the heritage of
Zope.  It was rewritten from scratch based on the latest software design
patterns and the experiences of Zope 2.

The component architecture is the very core of Zope 3 that allows developers 
to
create flexible and powerful web applications.


Compatibility with Zope 2
--

Zope 3 is not upwards compatible with Zope 2. This means you cannot run Zope 2
applications in Zope 3.

We continue to work on the transition from Zope 2 to Zope 3 by making Zope 2
use more and more of the Zope 3 infrastructure. This means that new code
written in Zope 2 can benefit from Zope 3 technology. Also, with care, code
can be written that works in both Zope 3 and Zope 2.  This allows a Zope 2
application to slowly evolve towards Zope 3.  Unchanged Zope 2 applications
are never expected to work in Zope 3, however.


Downloads
-

- Zope 3.4 Egg Index:
http://download.zope.org/zope3.4

- Zope 3.4 Controlled Packages:
http://download.zope.org/zope3.4/controlled-packages.cfg

- Zope 3.4 Latest Versions:
http://download.zope.org/zope3.4/versions.cfg

- The classic Zope 3 source release can be downloaded from:
http://zope.org/Products/Zope3

Installation instructions for both Windows and Un*x/Linux are now available in
the top level `README.txt` file of the distribution. The binary installer is
recommended for Windows.

Zope 3.4 requires Python 2.4.4 to run. You must also have zlib installed on
your system.


Resources
-

- Zope 3 Development Web Site:
http://wiki.zope.org/zope3

- Zope 3 Developers Mailing List:
http://mail.zope.org/mailman/listinfo/zope-dev

Retired: http://mail.zope.org/mailman/listinfo/zope3-dev

- Zope 3 Users Mailing List:
http://mail.zope.org/mailman/listinfo/zope3-users

- Bug tracker at launchpad:
https://launchpad.net/zope3

- IRC Channel:
#zope3-dev at irc.freenode.net


Acknowledgments
---

Much thanks to everyone who contributed to this release. Since all
contributi

Re: [Zope3-Users] wiki refactoring

2008-01-31 Thread Stephan Richter
On Thursday 31 January 2008, Roy Mathew wrote:
> I have reworked the FAQ by:
>
>   o splitting the page into smaller bits.
>   o fixing the wording of the question headers
>   o correcting a few typos.

Cool, I think it would be good to write a descriptive summary below each 
section in the overview, so people know a little bit more what the section is 
about.

> Please review the changes at: http://wiki.zope.org/zope3/FAQReworked
> and let me know if the new pages look reasonable. I have kept the older
> FAQ around - if I don't hear from anyone in the next couple of days,
> I'll assume that it's ok to replace the old with the new

I think this is a good assumption. :-)

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] http://wiki.zope.org/zope3/LocalComponentManagementSimplification status and implementation status aren't updated ?

2008-01-30 Thread Stephan Richter
On Sunday 02 December 2007, KLEIN Stephane wrote:
> * Status : IsProposal
> * Implementation Status : not implemented.
>
> Those information aren't updated ?

It's correct. This has been implemented in Zope 3.2 as promised.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] using zope.testing's testrunner outside of zope

2008-01-30 Thread Stephan Richter
On Wednesday 05 December 2007, Chris Withers wrote:
> I've come to realise that a lot of the python packages I've developed
> for use outside of zope (twiddler and mailinglogger spring to mind) rely
>   on zope.testing and work best with the testrunner in zope.testing.
>
> What's the best way to use this in a non-zope environment?

If you use buildout, there is a recipe for creating a test runner. See 

http://svn.zope.org/zope.kgs/trunk/?rev=83325

for a good example.

> Also, what's the best way to indicate in setup.py that my package needs
> zope.testing for the tests?

There is a "test" option, where you can list all packages that should be 
installed for testing. See

http://svn.zope.org/zope.component/trunk/setup.py?rev=81358&view=auto

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c:layout - not working with z3c.form.EditForm

2008-01-29 Thread Stephan Richter
On Tuesday 29 January 2008, kevin gill wrote:
> In answer to my own question, the EditForm must also inherit from the
> z3c.formuilayout.FormLayoutSupport class. This code now works:
>
>     from z3c.form import form
>     from z3c.formui import layout
>
>     class IndexForm(layout.FormLayoutSupport, form.EditForm):
>         pass

BTW, there is also z3c.formui.form that also defines an EditForm class that 
does the form layout support mixin for you. It also prevents a nasty 
recursion error when something goes wrong.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] formlib vs z3c.form

2008-01-27 Thread Stephan Richter
On Thursday 06 December 2007, Adam Summers wrote:
> How hard is it to get grok to play nicely with z3c.form et al? Has
> anyone any examples?

Since nobody has answered this follow-up question, here is a quick one from 
me: It is not harder or easier to integrate than other Zope 3 code. I bet you 
that is probably more of a case of being documented. Since I am not using 
grok, I cannot give you any examples.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] `easy_install z3c.widget` fails

2008-01-27 Thread Stephan Richter
On Saturday 08 December 2007, Kent Tenney wrote:
> It can't find z3c.schema
>
> Is there a better place to report?

http://svn.zope.org/z3c.schema/

But it has not been released as a package yet. I guess that should be done.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Literal double quoted string within single quoted attribute in ZPT

2008-01-27 Thread Stephan Richter
On Monday 17 December 2007, David Pratt wrote:
> Hi. Is there solution for create a single quoted attribute using
> tal:attributes containing literal double quoted items. I am using a
> python method for generating the string. I understand structure will
> unquote but it does not work with an attribute.

Well, attributes must always be quoted based on the XML spec, right. Otherwise 
TAL could produce invalid XML. What does the spec actually say about this?

> I see there is a new 
> z3c.tal package based on lxml.  Will I have to go as far as customizing
> tal to do this? I realize this may be best on the zpt list but it it
> rarely if ever used these days. Many thanks.

Well, if the XML specification allows for your output, we could consider it 
not working this way a bug. However, it would make the code much more 
complicated, I think (unless we support structure as well in this case).

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] sqlalchemy and FieldProperty

2008-01-27 Thread Stephan Richter
On Friday 21 December 2007, Darryl Cousins wrote:
> I find that when I map a class to a table I lose the auto-magic
> vaidation provided by FieldProperty when setting attributes.

I bet you that sqlalchemy does some evil class hacking. Actually, I gotta 
check this out. :-) Yeah, from looking at the mapper.py module, I can see 
that really weird things happen there. They overwrite attributes left and 
right. Man, I love persistent! I wish they would have used it as a base for 
their work.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zcml for z3c.form

2008-01-27 Thread Stephan Richter
Hi John,

On Thursday 24 January 2008, John wrote:
> I'm converting from formlib to z3c.form.

Cool! :-)

> What should my configure.zcml look like?
>
> For formlib it is:
>
>        for="zope.app.container.interfaces.IAdding"
>     name=".Person"
>     class=".browser.PersonAddForm"
>     permission="zope.ManageContent"
>     />
>
> I assume the 'for=' value should change, but to what?

Yep, it changes to the container interface:

   

By not using IAdding, it is hard (as in I have spent 30 mins trying to make it 
work and couldn't) to reuse the default add menu. That said, who still uses 
it? :-) The Zope 3 menu code is dog slow.

Also, note that we do support IAdding for the poor souls that still have or 
want to use it. See 
http://svn.zope.org/z3c.form/trunk/src/z3c/form/adding.txt?rev=78513&view=auto

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] wiki refactoring

2008-01-27 Thread Stephan Richter
On Monday 10 December 2007, Roy Mathew wrote:
> Now that the zope3 wiki has grown from an afterthought, to a
> signifcantly useful body of knowledge, I'd like to make the following
> proposal:
>
>  o split the wiki into smaller bits.
>  o rework the introduction slightly.
>  o fix the question headers
>  o start writing small HOWTOs (like the grok mini-HOWTOs).
>
> I am happy to help with any and all of the above. What do you think?

I think that the people that recently worked on the Wiki did a fine job. I 
just browsed through it the past two days and the story is nice. There are a 
few things that I would have done differently, but it is not major.,

Since you mentioned in a follow-up E-mail that you meant the FAQ, I had a 
quick look. I have to agree, it is huge. That's great! :-) But that also 
means we have to provide a new approach for presentation. I agree with all 
your points. I think the most important part would be to split the FAQ into 
themed sections, such as "UI Development", "Organization", "Development 
Process", etc.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


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

2008-01-27 Thread 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" to their own folder? Moreover, what happens
> if the original owner abandons the document?

You clearly thought about the problem, since you already provided 
solutions. :-) It all depends how you identify an owner. I do this by 
checking whether a user has been granted the Owner role locally.

Okay, so now we know how to retrieve the information. Next, how can we 
efficiently extract a list of all the documents a user owns. The answer is a 
catalog. You can create an index that records the owners of each document. 
(That should be about 5-10 lines of code.) When you provide the list, you 
simply return catalog query results, instead of iterating through all items 
in a folder.

What to do when someone abandons a document depends really on your decision 
where to locate it and how you implement other views.

1. If you have one large container, the solution is simple. You write a 
subscriber that checks whether the changed object still has an owner. If not, 
it is deleted. There is not need for more info tracking.

2. If you store the documents locally, and the removed owner matches the 
location user, I would move the documents either to a global "abandoned" 
folder or to the user folder of the next user on the list.

Which way you want to go, depends on your other design goals.

> If I have one huge container that holds all documents, how would then list
> users their documents?

Use a catalog query. Seriously; it is efficient.

> The other issue is how to set up permissions on these objects, would I e.g.
> store the owners along with the object (e.g. as an object attribute)?

As I said before, I do this using roles. Because you want to assign special 
permissions for owners anyways. Keeping the information twice, is just a 
senseless bookkeeping exercise. That said I commonly create a property for 
these cases:

@apply
def departmentManagers():
role_id = 'pkg.DepartmentManagerOwner'
def get(self):
prm = IPrincipalRoleManager(self)
return tuple([u for u, p in prm.getPrincipalsForRole(role_id)])
def set(self, value):
prm = IPrincipalRoleManager(self)
for principal_id, perm in prm.getPrincipalsForRole(role_id):
prm.unsetRoleForPrincipal(role_id, principal_id)
for principal_id in value:
prm.assignRoleToPrincipal(role_id, principal_id)
    return property(get, set)

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Building a viewlet-based menu

2008-01-27 Thread Stephan Richter
On Friday 04 January 2008, Hermann Himmelbauer wrote:
> My problem is that the update() function which sets the link does not
> always work. The link should always include the URL of the local site
> object, which is does not when a 404 page is displayed, therefore all menu
> entries have invalid links.
>
> Does anyone know why, or does someone have a better suggestion to my
> problem?

Right, this is a common problem for *all* context driven pieces of 
information. It happens, because the error does not have a parent in that 
particular case. When an exception is raised and not caught, it penetrates 
back all the way to the publisher. The publisher then takes the exception and 
looks up a view. When possible, the exception is wrapped in a location proxy 
with the parent being the last object in the publisher, which is either the 
application root or the object that got traversed. (see 
zope.publisher.publish.publish and zope.app.publication.zopepublication, line 
303)

Now, I know that Roger has struggled with this problem recently too. I am not 
sure whether he has a solution. If he doesn't, we should think of one. Now, 
404 might be special and maybe the 404 error page should not display menus 
and other stuff.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Zope on WSGI for Deployment - best to still use proxy behind apache? Good/bad servers?

2008-01-27 Thread Stephan Richter
On Wednesday 23 January 2008, Jeff Shell wrote:
> Is there any preferred server to use or not use? why?

Originally we wanted to drop support for zope.server over twisted, but it 
turned out that zope.server was much more stable.

> And ... mod_wsgi. I don't know much about it, but is it better to run
> through that than to go through mod_proxy?

We played with it a little bit and got it working without any hassle. But we 
did not test performance.

> We had one new customer totally surprise us with their traffic/load
> (mostly solved, for now, due to some aggressive caching) and I'm
> interested in trying to find new setups.

I think the server itself is not really creating the bottleneck. What you 
really want to do, is keep your transaction times in Zope very small, like in 
the 100ms range, because a Zope thread is blocked for that long. If you have 
queries or tasks that take a long time (>1sec), then you should  run that in 
a thread/process that does not block the server. A good package to start with 
would be lovely.remotetask -- I hope that we will soon release an extension 
that allows you to scale it better.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


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

2008-01-27 Thread Stephan Richter
On Thursday 17 January 2008, Hermann Himmelbauer wrote:
> I personally don't like macros that much, therefore I prefer Stephan
> Richters pagelet/viewlet approach, which you can find in z3c.pagelet.

We need to give credit to Roger here. He came up with pagelets as a response 
for hating macros like you do and not liking a pure viewlet approach either. 
That said, I have to agree, I like the pagelet pattern a lot too and it works 
beautiful for your typical Web application.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] how work around broken egg?

2008-01-27 Thread Stephan Richter
On Friday 25 January 2008, John wrote:
> I easy_installed a broken z3c.form-1.7.2-py2.4.egg into my zopeproject.  
> I'd like to fix it.  It looks possible to use svn to checkout 1.7.0 or
> 1.8.0 right into the egg directory.  Will this work or is there some
> setup script to run?  Is there a way to get 1.7.2 via svn (_1)?  Is
> there a better way than using svn?  Any suggestions appreciated.

I deleted the 1.7.2 release altogether, because it contained new features. 
That was really bad, because people would get new APIs but expect a bug fix 
release. If you remove the 1.7.2 release from your egg directory, it will now 
download 1.8.0, which is correct.

> Also, when the eggs are fixed, will another "bin/easy_install z3c.form"
> be sufficient to get the missing files?  Right now it tells me "z3c.form
> 1.7.2 is already the active version".  Will I need to remove the egg
> somehow and re-install it to get the complete files?

I believe easy_install has an update option. Yes, it does: "-U"

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: AW: [Zope3-Users] z3c-form meta.zcml error

2008-01-24 Thread Stephan Richter
On Thursday 24 January 2008, Roger Ineichen wrote:
> Stephan,
> do you have time do release the other eggs?

Yes.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: Fwd: [Zope3-Users] z3c-form meta.zcml error

2008-01-23 Thread Stephan Richter
On Wednesday 23 January 2008, Martijn Pieters wrote:
> On Jan 23, 2008 10:12 AM, Peter Koppatz <[EMAIL PROTECTED]> wrote:
> > What has changed between 1.7.0 and 1.7.2?
> >
> > ls -al | wc -l
> >
> > 1.7.0 --> 76
> > 1.7. 2 --> 47
> > there are no *-txt , *.zcml anymore!
>
> Someone must have built the release tarball from a fresh SVN export;
> setup.py does not include txt and zcml files and such by default when
> building a release tarball, while a development egg would include
> those. In other words, the maintainer of z3c.form (and I mean YOU,
> Stephan) should add a MANIFEST.in with the lines "global-include
> *.txt" and "global-include *.zcml" in it and re-roll the release.

The problem are faulty ZIP files that do not open correctly in Linux. The ZCML 
and Text files are there, but are not extracted correctly by setuptools. 
Roger forgot to create the releases with the "--format" option.

I have removed 1.7.1 and 1.7.2 from the repository and PyPI, because they were 
not bug fixes anyways, but new feature releases warranting a 1.8 release. I 
have uploaded the 1.8.0 release now to PyPI.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] z3c-form meta.zcml error

2008-01-23 Thread Stephan Richter
On Wednesday 23 January 2008, Philipp von Weitershausen wrote:
> I distinctly remember there being a Windows-related bug in setuptools,  
> but IIRC, it was about line endings in one of the EGG-INFO files  
> within ZIP files, or something like that. That one was fixed a while  
> ago. Not sure whether it made it to an actual setuptools release,  
> though.
>
> Btw, Windows users can generate standard tarballs using the --formats  
> switch:

Yep, that worked. Roger forgot those options. I am going to release real 
tarballs today.

As a general observation: Seeing so many people noticing the bad release right 
away makes me think that people are not using the KGS. I cannot stress 
enough, how good the KGS treats you, if you use it. ;-)

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


  1   2   3   4   5   6   7   8   9   >