[Grok-dev] Re: megrok.form/megrok.kss/grok 0.13

Dirceu Pereira Tiegs dirceutiegs at gmail.com
Mon Jun 30 22:21:00 EDT 2008


On Sun, Jun 29, 2008 at 5:01 PM, Kenneth Miller <xkenneth at gmail.com> wrote:
> All,

Hi Kenneth,

>    I've got a few issues I'd like to discuss here:
>
> megrok.kss and megrok.form on grok 0.13
>
>        Both of these modules seem to be broken, they're trying to call the
> grok.util function get_default_permission(**) which no longer exists.

Actually megrok.form works just fine with grok 0.13, I've just tested
it. It seems that the get_default_permission error only occurs when
megrok.kss is installed on a grok 0.13 buildout:

  File "/Users/dirceu/Documents/devel/grokenv/megrok.kss-0.2dev_r86018-py2.4.egg/megrok/kss/meta.py",
line 9, in ?
    from grok.util import get_default_permission, make_checker
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File
"/Users/dirceu/Documents/devel/grokenv/TesteMegrok/parts/app/site.zcml",
line 4.0-4.33
    ZopeXMLConfigurationError: File
"/Users/dirceu/Documents/devel/grokenv/TesteMegrok/src/testemegrok/configure.zcml",
line 4.2-4.37
    ZopeXMLConfigurationError: File
"/Users/dirceu/Documents/devel/grokenv/megrok.kss-0.2dev_r86018-py2.4.egg/megrok/kss/configure.zcml",
line 6.2-6.27
    ImportError: cannot import name get_default_permission

I will try to fix it later this week; any help is welcome, since I'm
not using grok 0.13 yet (and grok.util.get_default_permission was
removed after grok 0.12.1).

> megrok.kss on grok.12.1 WITH megrok.form:
>
>  I've noticed that when I included megrok.form into my
> setup.py/configure.zcml, that my KSS functionality would break, resulting in
> an error similar to the one at the bottom of the page. Now what I nailed it
> down to as I started stripping megrok.form away, is the inclusion of
> zc.resourcelibrary. I noticed megrok.kss behaves differently when
> zc.resourcelibrary is included (once again see the error below.) I tried
> debugging the error myself (I have very little zope experience) so I set a
> pdb.set_trace() inside the function just before it threw an exception to see
> what was causing it. Now the interesting part here is that when I removed
> zc.resourcelibrary, grok still called it for other functions, but when
> handling KSS commands, it no longer used anything from that package. The
> function in absoluteurl.py seems to be where are all the problems are
> occuring.
>
> Can anyone see if they can get both of these working under grok 0.12.1, or
> can we get them both running on grok 0.13? In order to duplicate this all
> you need to do is setup a project following the basic AJAX/KSS tutorial, and
> then add megrok.form to your setup.py and configure.zcml. Then whenever you
> try and execute any KSS action, it should barf.

Thanks for the detailed report. I think that the best approach is to
get megrok.kss working with grok 0.13 first; then we can test them
together on a grok 0.13 buildout.

Kenneth: you told me in pvt that you need only zc.datetimewidget for
your project. You should be able to use it easily without megrok.form
- just take a look on how megrok.form register and use
zc.datetimewidget on it's ZCML files.

Regards,
-- 
=====================================
Dirceu Pereira Tiegs
Weimar Consultoria

Hospedagem Plone, Django, Zope 3, Grok...
http://www.pytown.com
=====================================


More information about the Grok-dev mailing list