[Checkins] SVN: megrok.form/trunk/s Merging the branch back into
the trunk for proper release
Dirceu Pereira Tiegs
dirceutiegs at gmail.com
Wed Mar 19 20:31:36 EDT 2008
Log message for revision 84798:
Merging the branch back into the trunk for proper release
Changed:
U megrok.form/trunk/setup.py
U megrok.form/trunk/src/megrok/form/README.txt
U megrok.form/trunk/src/megrok/form/TODO.txt
U megrok.form/trunk/src/megrok/form/fields.py
U megrok.form/trunk/src/megrok/form/tests/test_form.py
-=-
Modified: megrok.form/trunk/setup.py
===================================================================
--- megrok.form/trunk/setup.py 2008-03-20 00:11:34 UTC (rev 84797)
+++ megrok.form/trunk/setup.py 2008-03-20 00:31:33 UTC (rev 84798)
@@ -2,7 +2,7 @@
from os import sep
from os.path import curdir
-version = '0.1'
+version = '0.2'
long_description = open(sep.join((curdir, 'src','megrok','form','README.txt'))).read()
@@ -21,7 +21,7 @@
keywords="grok form widgets fields constraints",
author="Dirceu Pereira Tiegs",
author_email="dirceutiegs at gmail.com",
- url="http://svn.zope.org/Sandbox/dirceu/megrok.form",
+ url="http://svn.zope.org/megrok.form",
license="ZPL",
package_dir={'': 'src'},
namespace_packages=['megrok'],
@@ -34,6 +34,7 @@
'z3c.widget',
'zc.datetimewidget',
'collective.namedfile',
+ 'collective.namedblobfile',
],
entry_points="""
# Add entry points here
Modified: megrok.form/trunk/src/megrok/form/README.txt
===================================================================
--- megrok.form/trunk/src/megrok/form/README.txt 2008-03-20 00:11:34 UTC (rev 84797)
+++ megrok.form/trunk/src/megrok/form/README.txt 2008-03-20 00:31:33 UTC (rev 84798)
@@ -11,6 +11,8 @@
- 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
-------
@@ -68,4 +70,4 @@
Authors
-------
-- Dirceu Pereira Tiegs (dirceutiegs at gmail dot com)
\ No newline at end of file
+- Dirceu Pereira Tiegs (dirceutiegs at gmail dot com)
Modified: megrok.form/trunk/src/megrok/form/TODO.txt
===================================================================
--- megrok.form/trunk/src/megrok/form/TODO.txt 2008-03-20 00:11:34 UTC (rev 84797)
+++ megrok.form/trunk/src/megrok/form/TODO.txt 2008-03-20 00:31:33 UTC (rev 84798)
@@ -2,8 +2,6 @@
megrok.form TODO
================
-- Release the egg
-
- Add input tests for all widgets
- Get rid of megrok.form.browser.tzinfo
Modified: megrok.form/trunk/src/megrok/form/fields.py
===================================================================
--- megrok.form/trunk/src/megrok/form/fields.py 2008-03-20 00:11:34 UTC (rev 84797)
+++ megrok.form/trunk/src/megrok/form/fields.py 2008-03-20 00:31:33 UTC (rev 84798)
@@ -1,6 +1,8 @@
from zope import interface, schema
from collective.namedfile.field import NamedImage as Image
from collective.namedfile.field import NamedFile as File
+from collective.namedblobfile.field import NamedBlobImage as BlobImage
+from collective.namedblobfile.field import NamedBlobFile as BlobFile
import constraints
import interfaces
Modified: megrok.form/trunk/src/megrok/form/tests/test_form.py
===================================================================
--- megrok.form/trunk/src/megrok/form/tests/test_form.py 2008-03-20 00:11:34 UTC (rev 84797)
+++ megrok.form/trunk/src/megrok/form/tests/test_form.py 2008-03-20 00:31:33 UTC (rev 84798)
@@ -2,7 +2,7 @@
from zope import component, interface, schema
from zope.publisher.browser import TestRequest
from zope.schema.interfaces import ConstraintNotSatisfied
-from megrok.form.fields import Email, Image, HTML, File
+from megrok.form.fields import Email, Image, HTML, File, BlobFile, BlobImage
import unittest
class MeGrokFormTest(grok.Application, grok.Container):
@@ -17,17 +17,21 @@
description = HTML(title=u"Description")
birthday = schema.Date(title=u"Birthday")
resume = File(title=u"Resume")
+ video = BlobFile(title=u"Favorite Video")
+ wallpaper = BlobImage(title=u"Favorite Wallpaper")
class Person(grok.Model):
interface.implements(IPerson)
- def __init__(self, name, email, picture, description, birthday, resume):
+ def __init__(self, name, email, picture, description, birthday, resume, video, wallpaper):
self.name = name
self.email = email
self.picture = picture
self.description = description
self.birthday = birthday
self.resume = resume
+ self.video = video
+ self.wallpaper = wallpaper
class AddPerson(grok.AddForm):
grok.context(MeGrokFormTest)
@@ -74,6 +78,14 @@
# test rendered file widget
s = """<div class="widget">\n\t<input type="hidden" value="" name="form.resume.used"\n id="form.resume.used" />\n\t\n\t\n\t<div>\n\t\t<input type="file" maxlength="True" class="" size="30"\n name="form.resume" id="form.resume" />\n\t\t\n\t</div>\n</div>"""
assert(s in rendered_form)
+
+ # test rendered blobfile widget
+ s = """<div class="widget">\n\t<input type="hidden" value="" name="form.video.used"\n id="form.video.used" />\n\t\n\t\n\t<div>\n\t\t<input type="file" maxlength="True" class="" size="30"\n name="form.video" id="form.video" />\n\t\t\n\t</div>\n</div>"""
+ assert(s in rendered_form)
+
+ # test rendered blobimage widget
+ s = """<div class="widget">\n\t<input type="hidden" value="" name="form.wallpaper.used"\n id="form.wallpaper.used" />\n\t\n\t\n\t<div>\n\t\t<input type="file" maxlength="True" class="" size="30"\n name="form.wallpaper" id="form.wallpaper" />\n\t\t\n\t</div>\n</div>"""
+ assert(s in rendered_form)
def test_email_default_constraint(self):
"""
More information about the Checkins
mailing list