[Grok-dev] having the user select a date

Dirceu Pereira Tiegs dirceutiegs at gmail.com
Mon Feb 11 05:33:56 EST 2008

On Feb 7, 2008 11:01 PM, Luciano Ramalho <luciano at ramalho.org> wrote:
> It is really a sad state of affairs when a developer needing a decent
> date widget needs to ask around for one.
> IMHO, a minimum set of business-oriented widgets, including date,
> datetime and e-mail, must be part of the standard Grok distro if we
> want to be real contenders. And those widgets should be the defaults
> for the corresponding fields, and not require any special wiring to
> setup.
> Yes, I believe we need an e-mail field, even if it is trivial to whip
> up your own. It's just too common in web apps to be unavailable in the
> most basic distro.

I've developed something called megrok.form, which is a zope package
that configure default widgets (including the ones from
zc.datetimewidget) and provide some new fields. This is the README:


megrok.form is a helper package that provides some useful fields,
widgets and constraints for Grok.


- Email, a TextLine field with a default contraint
- HTML, a Text field that uses z3c.widget.tiny
- File, from collective.namedfile
- Image, from collective.namedfile


megrok.form overrides the default widgets for:

- zope.interface.schema.Date (using zc.datetimewidget.widget.DateWidget)
- zope.interface.schema.Datetime (using zc.datetimewidget.widget.DatetimeWidget)

And add new widgets for Image and File (from collective.namedfile).

Validators / Constraints

megrok.form add constraints for:

- US Phone Numbers
- International Phone Numbers
- Zip Code
- Email

It can be found at http://svn.zope.org/Sandbox/dirceu/megrok.form. I
need to add more automated tests and then release it on cheeseshop,
but it works right now.

Dirceu Pereira Tiegs
Weimar Consultoria

Hospedagem Plone, Zope e Python

More information about the Grok-dev mailing list