[ckan-dev] {% scripts %} tag

Matt Moyles matt.moyles at matricresearch.com
Mon Mar 25 21:14:59 UTC 2013


I'm having a problem getting my script to be added to the bottom of the list. I need to load my script after jquery. 

Currently, I'm trying this:

{% block scripts %} 
{{ super() }} 
<script src="/ckanext-news/js/homepage.js"></script> 
{% endblock %} 

but in the output I am getting: 

<script src="/ckanext-news/js/homepage.js"></script>
<script>document.getElementsByTagName('html')[0].className += ' js';</script>
<script type="text/javascript" src="/fanstatic/vendor/:version:2013-03-12T20:56:49.75/jquery.js"></script>
<script type="text/javascript" src="/fanstatic/vendor/:version:2013-03-12T20:56:49.75/bootstrap/js/bootstrap-transition.js"></script>
<script type="text/javascript" src="/fanstatic/vendor/:version:2013-03-12T20:56:49.75/bootstrap/js/bootstrap-collapse.js"></script>
<script type="text/javascript" src="/fanstatic/vendor/:version:2013-03-12T20:56:49.75/bootstrap/js/bootstrap-modal.js"></script>
<script type="text/javascript" src="/fanstatic/vendor/:version:2013-03-12T20:56:49.75/bootstrap/js/bootstrap-alert.js"></script>
<script type="text/javascript" src="/fanstatic/vendor/:version:2013-03-12T20:56:49.75/bootstrap/js/bootstrap-tab.js"></script>

I've been hunting through the layout_base.html and layout.html templates but have been unable to figure this out. Do I need cache the script with fanstatic? If so, is there a guide on how to use fanstatic?

Matt




More information about the ckan-dev mailing list