Skip to content

Commit

Permalink
* Reverted use of zope.container instead of zope.app.container.
Browse files Browse the repository at this point in the history
* Adapted tests to the grokcore.view split of View and CodeView.
* Fixed forms to use self.template.render() directly instead of using a
  removed private method from grokcore.view.
  • Loading branch information
reinout committed Jul 4, 2009
1 parent 1785df4 commit fcdacfb
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 65 deletions.
5 changes: 4 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ Changes
1.2 (unreleased)
----------------

* Use zope.container instead of zope.app.container.
* Adapted tests to the grokcore.view split of View and CodeView.

* Fixed forms to use self.template.render() directly instead of using a
removed private method from grokcore.view.

* Add grok.View permissions for functional tests.

Expand Down
8 changes: 8 additions & 0 deletions buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ parts = interpreter test
extends = versions.cfg
versions = versions


[versions]
grokcore.formlib =

grokcore.view = 1.9
# ^^^^ can go after update to new grok version list


[interpreter]
recipe = zc.recipe.egg
eggs = grokcore.formlib
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ def read(*rnames):
'martian >= 0.10',
'grokcore.component >= 1.5',
'grokcore.security >= 1.1',
'grokcore.view >= 1.1',
'grokcore.view >= 1.9',
'zope.formlib',
# for tests:
'zope.testing',
'zope.lifecycleevent',
'zope.securitypolicy',
'zope.app.zcmlfiles',
'zope.container',
],
)
2 changes: 1 addition & 1 deletion src/grokcore/formlib/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def render(self):
# causes the widgets to have different data
self.resetForm()
self.form_reset = False
self.form_result = self._render_template()
self.form_result = self.template.render(self)

return self.form_result

Expand Down
2 changes: 1 addition & 1 deletion src/grokcore/formlib/configure.zcml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<configure xmlns="http://namespaces.zope.org/zope">

<include package="grokcore.view" />
<include package="zope.container" />
<include package="zope.app.container" />
<include package="zope.formlib" />

</configure>
8 changes: 4 additions & 4 deletions src/grokcore/formlib/ftests/form/addform.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
import grokcore.formlib as grok
from zope import schema
from zope.interface import Interface, implements
from zope.container.btree import BTreeContainer
from zope.container.contained import Contained
from zope.container.interfaces import IContainer
from zope.app.container.btree import BTreeContainer
from zope.app.container.contained import Contained
from zope.app.container.interfaces import IContainer

class Zoo(grok.testing.Model, BTreeContainer):
grok.testing.protect_get(grok.Public, *IContainer)
Expand All @@ -48,7 +48,7 @@ def __init__(self, name='', size=''):
self.name = name
self.size = size

class Index(grok.View):
class Index(grok.CodeView):
grok.context(Mammoth)
def render(self):
return 'Hi, my name is %s, and I\'m "%s"' % (self.context.name,
Expand Down
6 changes: 3 additions & 3 deletions src/grokcore/formlib/ftests/form/addform_applydata.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
import grokcore.formlib as grok
from zope import schema, interface
from zope.lifecycleevent.interfaces import IObjectModifiedEvent
from zope.container.btree import BTreeContainer
from zope.container.interfaces import IContainer
from zope.app.container.btree import BTreeContainer
from zope.app.container.interfaces import IContainer

class Zoo(grok.testing.Model, BTreeContainer):
grok.testing.protect_get(grok.Public, *IContainer)
Expand All @@ -45,7 +45,7 @@ class Mammoth(grok.testing.Model):
grok.testing.protect_get(grok.Public, 'name', 'size')
grok.testing.protect_set(grok.Public, 'name', 'size')

class Index(grok.View):
class Index(grok.CodeView):
grok.context(Mammoth)
def render(self):
return 'Hi, my name is %s, and I\'m "%s"' % (self.context.name,
Expand Down
4 changes: 2 additions & 2 deletions src/grokcore/formlib/ftests/form/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ class Mammoth(grok.testing.Model):
implements(IMammoth)
grok.testing.protect_get(grok.Public, 'name', 'report')
grok.testing.protect_set(grok.Public, 'name', 'report')

name = u'Manfred'

class Index(grok.View):
class Index(grok.CodeView):

def render(self):
return "%s, the Mammoth reports: %s" % (self.context.name,
Expand Down
102 changes: 51 additions & 51 deletions versions.cfg
Original file line number Diff line number Diff line change
@@ -1,110 +1,110 @@
[versions]
ClientForm = 0.2.9
Pygments = 0.8.1
RestrictedPython = 3.4.2
ZConfig = 2.5.1
ZODB3 = 3.8
docutils = 0.4
grokcore.component = 1.5.1
grokcore.component = 1.7
grokcore.formlib = 1.1
grokcore.security = 1.1
grokcore.view = 1.4
grokcore.view = 1.7
grokcore.viewlet = 1.0
grokui.admin = 0.3.2
martian = 0.11
mechanize = 0.1.7b
pytz = 2007k
RestrictedPython = 3.4.2
simplejson = 1.7.1
z3c.autoinclude = 0.2.2
z3c.flashmessage = 1.0
z3c.testsetup = 0.2.1
zc.catalog = 1.2
zc.catalog = 1.2.0
ZConfig = 2.5.1
zc.recipe.testrunner = 1.0.0
zdaemon = 2.0.2
zodbcode = 3.4
ZODB3 = 3.8.1
zodbcode = 3.4.0
zope.annotation = 3.4.1
zope.app.apidoc = 3.4.3
zope.app.applicationcontrol = 3.4.3
zope.app.appsetup = 3.4.1
zope.app.authentication = 3.4.3
zope.app.basicskin = 3.4
zope.app.broken = 3.4
zope.app.authentication = 3.4.4
zope.app.basicskin = 3.4.0
zope.app.broken = 3.4.0
zope.app.catalog = 3.5.1
zope.app.component = 3.4.1
zope.app.container = 3.5.6
zope.app.content = 3.4
zope.app.content = 3.4.0
zope.app.debug = 3.4.1
zope.app.dependable = 3.4
zope.app.dependable = 3.4.0
zope.app.error = 3.5.1
zope.app.exception = 3.4.1
zope.app.file = 3.4.4
zope.app.folder = 3.4
zope.app.folder = 3.4.0
zope.app.form = 3.4.1
zope.app.generations = 3.4.1
zope.app.http = 3.4.1
zope.app.i18n = 3.4.4
zope.app.interface = 3.4
zope.app.interface = 3.4.0
zope.app.intid = 3.4.1
zope.app.keyreference = 3.4.1
zope.app.locales = 3.4.5
zope.app.onlinehelp = 3.4.1
zope.app.pagetemplate = 3.4.1
zope.app.preference = 3.4.1
zope.app.principalannotation = 3.4
zope.app.principalannotation = 3.4.0
zope.app.publication = 3.4.3
zope.app.publisher = 3.4.1
zope.app.renderer = 3.4
zope.app.publisher = 3.5.1
zope.app.renderer = 3.4.0
zope.app.rotterdam = 3.4.1
zope.app.schema = 3.4
zope.app.schema = 3.4.0
zope.app.security = 3.5.2
zope.app.securitypolicy = 3.4.6
zope.app.server = 3.4.2
zope.app.session = 3.5.1
zope.app.skins = 3.4
zope.app.skins = 3.4.0
zope.app.testing = 3.4.3
zope.app.tree = 3.4
zope.app.tree = 3.4.0
zope.app.twisted = 3.4.1
zope.app.wsgi = 3.4.1
zope.app.zapi = 3.4
zope.app.zapi = 3.4.0
zope.app.zcmlfiles = 3.4.3
zope.app.zopeappgenerations = 3.4
zope.app.zopeappgenerations = 3.4.0
zope.cachedescriptors = 3.4.1
zope.component = 3.4
zope.configuration = 3.4
zope.container = 3.7.1
zope.contentprovider = 3.4
zope.contenttype = 3.4
zope.copypastemove = 3.4
zope.datetime = 3.4
zope.deferredimport = 3.4
zope.deprecation = 3.4
zope.component = 3.4.0
zope.configuration = 3.4.0
zope.contentprovider = 3.4.0
zope.contenttype = 3.4.0
zope.copypastemove = 3.4.0
zope.datetime = 3.4.0
zope.deferredimport = 3.4.0
zope.deprecation = 3.4.0
zope.dottedname = 3.4.2
zope.dublincore = 3.4
zope.dublincore = 3.4.0
zope.error = 3.5.1
zope.event = 3.4
zope.exceptions = 3.4
zope.filerepresentation = 3.4
zope.formlib = 3.4
zope.hookable = 3.4
zope.i18n = 3.4
zope.event = 3.4.0
zope.exceptions = 3.4.0
zope.filerepresentation = 3.4.0
zope.formlib = 3.4.0
zope.hookable = 3.4.0
zope.i18n = 3.4.0
zope.i18nmessageid = 3.4.3
zope.index = 3.4.1
zope.interface = 3.4.1
zope.lifecycleevent = 3.4
zope.location = 3.4
zope.minmax = 1.1
zope.modulealias = 3.4
zope.pagetemplate = 3.4
zope.lifecycleevent = 3.4.0
zope.location = 3.4.0
zope.minmax = 1.1.0
zope.modulealias = 3.4.0
zope.pagetemplate = 3.4.0
zope.proxy = 3.4.2
zope.publisher = 3.4.6
zope.schema = 3.4
zope.publisher = 3.4.8
zope.schema = 3.4.0
zope.security = 3.4.1
zope.securitypolicy = 3.4.1
zope.server = 3.4.3
zope.session = 3.4.1
zope.size = 3.4
zope.structuredtext = 3.4
zope.size = 3.4.0
zope.structuredtext = 3.4.0
zope.tal = 3.4.1
zope.tales = 3.4
zope.tales = 3.4.0
zope.testbrowser = 3.4.2
zope.testing = 3.5.4
zope.testing = 3.6.0
zope.thread = 3.4
zope.traversing = 3.4.1
zope.viewlet = 3.4.2

0 comments on commit fcdacfb

Please sign in to comment.