[Grok-dev] [Checkins] SVN: grokui.admin/trunk/ Making grokui.admin work with the changes in grok/grokcore.site trunk.
Jan-Jaap Driessen
jdriessen at thehealthagency.com
Sun Jan 2 14:58:25 EST 2011
Hi,
IApplication and getApplication have been moved from grok to grokcore.site.
As a result, the grok documentation is currently inconsistent and I
had to make these changes in grokui.admin:
On 2 January 2011 20:51, Jan-Jaap Driessen
<jdriessen at thehealthagency.com> wrote:
> Log message for revision 119259:
> Making grokui.admin work with the changes in grok/grokcore.site trunk.
>
> Changed:
> U grokui.admin/trunk/buildout.cfg
> U grokui.admin/trunk/setup.py
> U grokui.admin/trunk/src/grokui/admin/applications.py
> U grokui.admin/trunk/src/grokui/admin/views.py
>
> -=-
> Modified: grokui.admin/trunk/buildout.cfg
> ===================================================================
> --- grokui.admin/trunk/buildout.cfg 2011-01-02 19:18:58 UTC (rev 119258)
> +++ grokui.admin/trunk/buildout.cfg 2011-01-02 19:51:53 UTC (rev 119259)
> @@ -2,6 +2,12 @@
> develop = .
> parts = test
> extends = http://svn.zope.org/repos/main/groktoolkit/trunk/grok.cfg
> +extensions = mr.developer
> +auto-checkout = grok
> + grokcore.xmlrpc
> + grokcore.traverser
> + grokcore.site
> + grokcore.rest
>
> [versions]
> grokui.admin =
>
> Modified: grokui.admin/trunk/setup.py
> ===================================================================
> --- grokui.admin/trunk/setup.py 2011-01-02 19:18:58 UTC (rev 119258)
> +++ grokui.admin/trunk/setup.py 2011-01-02 19:51:53 UTC (rev 119259)
> @@ -45,6 +45,7 @@
> install_requires=[
> 'ZODB3',
> 'grok',
> + 'grokcore.site >= 1.5',
> 'grokui.base',
> 'megrok.layout >= 1.0.1',
> 'setuptools',
>
> Modified: grokui.admin/trunk/src/grokui/admin/applications.py
> ===================================================================
> --- grokui.admin/trunk/src/grokui/admin/applications.py 2011-01-02 19:18:58 UTC (rev 119258)
> +++ grokui.admin/trunk/src/grokui/admin/applications.py 2011-01-02 19:51:53 UTC (rev 119259)
> @@ -1,6 +1,7 @@
> # -*- coding: utf-8 -*-
>
> import grok
> +from grokcore.site.interfaces import IApplication
> from ZODB.broken import Broken
> from grokui.admin import representation
> from zope.traversing.browser import absoluteURL
> @@ -70,7 +71,7 @@
>
> def update(self):
> # Available apps...
> - apps = getAllUtilitiesRegisteredFor(grok.interfaces.IApplication)
> + apps = getAllUtilitiesRegisteredFor(IApplication)
> self.installable = (InstallableApplication(x) for x in apps)
>
> # Installed apps...
>
> Modified: grokui.admin/trunk/src/grokui/admin/views.py
> ===================================================================
> --- grokui.admin/trunk/src/grokui/admin/views.py 2011-01-02 19:18:58 UTC (rev 119258)
> +++ grokui.admin/trunk/src/grokui/admin/views.py 2011-01-02 19:51:53 UTC (rev 119259)
> @@ -4,6 +4,7 @@
> import grok
> from BTrees.OOBTree import OOBTree
> from grok.util import create_application
> +from grokcore.site.interfaces import IApplication
> from grokui.base import IGrokUIRealm
> from grokui.admin.interfaces import ISecurityNotifier
> from grokui.admin.utilities import getVersion, getURLWithParams
> @@ -69,7 +70,7 @@
> if name is None or name == "":
> self.redirect(self.url(self.context, 'applications'))
> return
> - app = getUtility(grok.interfaces.IApplication, name=application)
> + app = getUtility(IApplication, name=application)
> if name in self.context.root.keys():
> self.flash(u'Name `%s` already in use. '
> u'Please choose another name.' % (name,))
>
> _______________________________________________
> checkins mailing list
> checkins at zope.org
> https://mail.zope.org/mailman/listinfo/checkins
>
Should there be a convenience import in grok/__init__.py?
--
Jan-Jaap Driessen
More information about the Grok-dev
mailing list