[ckan-dev] Exclude CKAN JS resources

Ross Thompson ross.thompson.ca at gmail.com
Thu May 8 15:55:48 UTC 2014


Ahh, my bad.I thought I had tried that already and it was still loading the
original resources, but I must have overwritten the block on the wrong
template or some combination of other changes. Definitely preferable
removing the resources altogether.

Thanks!


On 8 May 2014 11:22, Vitor Baptista <vitor at vitorbaptista.com> wrote:

> Hi Ross,
>
> As far as I can see, the problem isn't creating the resources, but loading
> them. It's done at
> https://github.com/ckan/ckan/blob/master/ckan/templates/page.html#L132-L139.
> So, if you overwrite that block in your template, you should be fine.
>
> Keep in mind that many plugins depend on that resource, so they'll end up
> loading it.
>
> Cheers,
>
>
> 2014-05-08 12:02 GMT-03:00 Ross Thompson <ross.thompson.ca at gmail.com>:
>
> I have found that in the ckan/lib/fanstatic_resources.py module in CKAN
>> core that four fanstatic libraries are always created - regardless of any
>> theming work you may be doing.
>>
>> For our work with our very custom theme library which requires making
>> jquery 2.1 and 1,11 available, I have not yet found an alternative to
>> patching this module to get rid of the calls to create_library() at the
>> bottom of the module in order to prevent CKAN from loading the base
>> resources.config.
>>
>> If anyone has alternatives, I too would be interested.
>>
>> Ross
>> Statistics Canada
>>
>>
>> On 8 May 2014 07:14, Kirstein, Fabian <
>> fabian.kirstein at fokus.fraunhofer.de> wrote:
>>
>>>  Hello,
>>>
>>>
>>>
>>> I’m developing a very custom CKAN theme within an extension, with own
>>> CSS and JavaScript. I have a custom base.html and derived templates from
>>> that. But CKAN is still including all its JavaScript etc., configured in
>>> public/base/javascript/resources.config. I don’t want any of those
>>> resources, they are causing some conflicts. Is there any way to prevent
>>> this behaviour within my extension?
>>>
>>>
>>>
>>> Thanks a lot
>>>
>>> Fabian.
>>>
>>>
>>>
>>>
>>>
>>> ----
>>>
>>>
>>>
>>> Fabian Kirstein
>>>
>>> Fraunhofer-Institut für Offene Kommunikationssysteme FOKUS
>>>
>>> Kompetenzzentrum Electronic Government and Applications
>>>
>>>
>>>
>>> Kaiserin-Augusta-Allee 31
>>>
>>> 10589 Berlin, Deutschland
>>>
>>> Tel.  + 49 30 3463 7718
>>>
>>> E-Mail: fabian.kirstein at fokus.fraunhofer.de
>>>
>>> Internet: www.fokus.fraunhofer.de
>>>
>>>
>>>
>>> _______________________________________________
>>> ckan-dev mailing list
>>> ckan-dev at lists.okfn.org
>>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>>
>>>
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>
>>
>
>
> --
>
> Vítor Baptista
>
> Developer  |  http://vitorbaptista.com | LinkedIn<http://www.linkedin.com/in/vitorbaptista>|
> @vitorbaptista <http://twitter.com/vitorbaptista>
>
> The Open Knowledge Foundation <http://okfn.org>
>
> *Empowering through Open Knowledge*
>
> http://okfn.org/  |  @okfn <http://twitter.com/okfn>  |  OKF on Facebook<https://www.facebook.com/OKFNetwork> |
> Blog <http://blog.okfn.org/>  |  Newsletter<http://okfn.org/about/newsletter/>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140508/6ceca334/attachment-0003.html>


More information about the ckan-dev mailing list