Hi Sebastian,
Op 8 jul 2009, om 17:40 heeft Sebastian Ware het volgende geschreven:
> I can't get my head around how to use hurry.resource. In the
> README.txt a synthetic Request object is created to store the
> inclusions in, but I don't understand how this would look in a real
> Grok application.
I ran into this too, two weeks ago; see my message at
http://article.gmane.org/gmane.comp.web.zope.grok.devel/8176
for an example of how to declare your resources; if you want to use
them, you can do something like (after having declared "sprintf" as a
hurry.resource ResourceInclusion as in the example)
class Frop(grok.View):
def update(self):
sprintf.need()
If this frop view is rendered, the sprintf resource will be put in the
<head> section of your document automagically, even if it's not
present in you template.
(I still haven't been able to resurrect my grok.zope.org account, so
this is still undocumented there)
Cheers,
--
Jasper Spaans
Fox-IT Experts in IT Security!
I www.fox-it.com
_______________________________________________
Grok-dev mailing list
Grok-dev@...
http://mail.zope.org/mailman/listinfo/grok-dev