[Grok-dev] Call for feedbacks : megrok.Resource

Uli Fouquet uli at gnufix.de
Thu Feb 18 08:03:28 EST 2010

Hi there,

Souheil CHELFOUH wrote:

> I wondered if any of you (except Christian Klinger, because I already
> know), use the lib megrok.resource, which is a grok layer above
> hurry.resource ?
> Feedbacks would be more than welcome on that strategical library. I
> have already an extension for it, but I need opinions and suggestions,
> first.
> If you could take 5 min to write a note, I'll greatly appreciate it.

After your posting I tried to build the KSS drag-and-drop example on


using hurry.yui and hurry.zoperesource with Grok 1.0. That worked like a
charm :-) Instead of adding lots of '++resource++' links in the header
of the page template, I wrote an update method for the view that
need()-ed the appropriate YUI-files. Clean, fast, nice :-)

Afterwards I tried to use megrok.resource which didn't work in the
beginning. The instance even refused to start-up complaining about a
missing zope.site module.

In fact zope.site is explicitly called in megrok.resource.traversal but
not mentioned in setup.py requirements (it is mentioned, but only for

I then made the zope.site import in traversal module conditional::

      from zope.site.hooks import getSite
  except ImportError:
      # BBB stay compatible with Grok 1.0
      from zope.app.component.hooks import getSite

and that worked with Grok 1.0 (although I could not find out quickly how
to enable minified inclusions, except via hurry.resource.mode() ).

I then tried to run the megrok.resource tests using grok.1.0.cfg. That
failed for similar reasons (zope.site required packages incompatible
with this config). After removing zope.site from tests-requirement and
applying the above fix, the tests ran fine (which is certainly not a
solution). So, I assume megrok.resource is for Grok > 1.0 only?

Best regards,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20100218/5ed3dcd2/attachment.bin 

More information about the Grok-dev mailing list