[ckan-dev] Fanstatic resources

Toby Dacre toby.okfn at gmail.com
Wed Aug 29 08:17:01 UTC 2012


Hi,

Further to my email last week about fanstatic (see below)

implications of this change

1) we can bundle multiple small files into single files to save connections
2) serve minified resources in production, non-minified in development
3) deal with all our known requirements html5 css shim, IE conditional
includes, inline scripts
4) simple to add resource to pages  eg {% resource base/base %}
5) .js generally added to bottom of the page
6) we don't include duplicate resources

1) works differently than old system so need to learn how to use it - but
pretty simple
2) all extensions/pages will need to use the system as for example jquery
ends up being in the bottom of the page (this could be semi-automated)
3) fanstatic has been monkey patched but these are now much smaller
(basically adding 3 lines of code), they and a custom ckan renderer live in
https://github.com/okfn/ckan/blob/2618-nested-resources/ckan/lib/fanstatic_extensions.py


This is an all or nothing change that would be hard to reverse so we want
to be sure we want to do this.  This is also a rare opportunity to add this
functionality as once we have changed templating systems we are stuck with
the decision we have made.

I think we should go for this but I'm giving people a final chance to
object/ask questions before I merge it into the demo branch and it becomes
a pretty perminant change to ckan.

Cheers
Toby

On 20 August 2012 12:46, Toby Dacre <toby.okfn at gmail.com> wrote:

> Hi,
>
> As part of the Jinja2 make-over resources (.css, .js) will be included
> differently.  I've made a first stab at documenting this.
>
> I'd be interested in any feedback on the documentation.
>
> https://github.com/okfn/ckan/blob/2618-nested-resources/doc/resources.rst
>
> Toby
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20120829/a3c4cde6/attachment.html>


More information about the ckan-dev mailing list