<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>megrok.form</name>
<shortdesc>Fields, Widgets and Constraints for Grok</shortdesc>
<description>===========
megrok.form
===========

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

Fields
------

- 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
- BlobFile, from collective.namedblobfile
- BlobImage, from collective.namedblobfile

Widgets
-------

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:

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

Installation
------------

To use megrok.form under Grok all you need is to install megrok.form as an egg 
and include it's zcml. The best place to do this is to make megrok.form
a dependency of your application by adding it to your install_requires
list in setup.cfg. If you used grokprojet to create your application setup.cfg
is located in the project root. It should look something like this::

   install_requires=['setuptools',
                     'grok',
                     'megrok.form',
                     # Add extra requirements here
                     ],

Then include megrok.form in your configure.zcml. If you used grokproject to
create your application it's at src/&lt;projectname&gt;/configure.zcml. Add the
include line after the include line for grok, but before the grokking of the
current package. It should look something like this::

      &lt;include package="grok" /&gt;
      &lt;include package="megrok.form" /&gt;  
      &lt;grok:grok package="." /&gt;
  
Then run bin/buildout again. You should now see buildout saying something like::

   Getting distribution for 'megrok.form'.
   Got megrok.form 0.2.2.

That's all.

Using Blob Storage
------------------

To use blob storage you need to change zodb definition in your parts/zopectl/zope.conf like this::

      &lt;zodb&gt;
        &lt;blobstorage&gt;
          &lt;filestorage&gt;
            path /path_to_your_app/parts/data/Data.fs
          &lt;/filestorage&gt;
          blob-dir /path_to_your_app/parts/data/blobs
        &lt;/blobstorage&gt;
      &lt;/zodb&gt;

The blob-dir specifies where you want to store blobs.

Authors
-------

- Dirceu Pereira Tiegs (dirceutiegs at gmail dot com)</description>
<homepage rdf:resource="http://svn.zope.org/megrok.form" />
<maintainer><foaf:Person><foaf:name>Dirceu Pereira Tiegs</foaf:name>
<foaf:mbox_sha1sum>5ffb32ce4fc544295d9d2e5339e716248bf0d11d</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>0.2.5</revision></Version></release>
</Project></rdf:RDF>