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

Kathy Manwaring kathy at perfectnotes.com.au
Thu Feb 18 15:35:32 EST 2010

I would like to use hurry.yui in the near future, as I have used some of
the YUI pieces in the past before I started using Zope or Grok, so would
you be able to either write/start a tutorial for this, or at least send me
the example code (possibly off-list)?



Thu, 18 Feb 2010 14:03:28 +0100, Uli Fouquet <uli at gnufix.de> wrote:
> 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
> http://grok.zope.org/documentation/how-to/using-a-kss-plugin-in-grok-for-drag-and-drop
> 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
> tests).
> I then made the zope.site import in traversal module conditional::
>   try:
>       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,
> --
> Uli
> -------------- 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-0001.bin

More information about the Grok-dev mailing list