[Grok-dev] Call for feedbacks : megrok.Resource
Souheil CHELFOUH
trollfot at gmail.com
Thu Feb 18 08:18:54 EST 2010
And, sorry, I read too quickly :
The mode is only set via the hurry.resource.mode
I didn't quite found a way to ease that use...
Any idea is welcome, of course.
2010/2/18 Souheil CHELFOUH <trollfot at gmail.com>:
> Thank you Uli, for the feedback
> I certainly missed the dependency and i'm going to fix that quickly.
> Yes, megrok.resource was meant to be for 1.1 and is currently used in
> production for grok 1.1a2 sites.
>
> As for the minified version, the option is not there yet !
> Martijn was asking about it too, I shamely didn't include it.
> Currently, it explicitly looks for depends and bottom.
> I'm going to fix that and release a new version.
>
> As a record, for everyone here, I did code a small extension, if
> people are keen to try it :
> http://gitweb.dolmen-project.org/megrok.resourcemerger.git
> It allows a merging and slimming of a ResourceLibrary component.
>
> Cheers.
> PS : i'll try to release the update in the coming hours
>
> 2010/2/18 Uli Fouquet <uli at gnufix.de>:
>> 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
>>
>>
>
More information about the Grok-dev
mailing list