[Grok-dev] hurry.resource addition
Matthias
nitro at dr-code.org
Wed Sep 8 09:51:44 EDT 2010
I'd like hurry.resource to include an "id" attribute in the rendered code,
especially for css. This is useful if you want to change stylesheets
dynamically.
1) I can see two ways to realize this:
a) Add id = None to ResourceInclusion.__init__ . Store it as an
attribute which can be accessed.
b) Make it a little more generic and add extra_attributes = {} to
ResourceInclusion.__init__. To add a custom id you'd call
ResourceInclusion( ... , extra_attributes = { 'id' : 'myId' } )
Both ways require the render_css and render_js methods to be changed,
so they output the id/extra_attributes.
2) Is this wanted at all?
3) If this is wanted, shall I create a patch and send it to this list for
review?
4) My version of hurry.resource is 0.4.1 (seems to come from grok or
dolmen?). Assuming a patch against the latest hurry.resource makes it
through, can I use the new version of hurry.resource in parallel to the
version installed by grok/dolmen? Or do I have to wait until there's a new
grok/dolmen release which incorporates the latest hurry.resource with
patch?
I'm new to grok, so all this package management is still a bit obscure to
me :)
-Matthias
More information about the Grok-dev
mailing list