I am working on a DjangoCMS plugin, which includes a javascript file for itself. The plugin's Javascript relies on the same libraries that the rest of the site does. So, here's the conceptual part of what I have right now:
Basetemplate.html
{% load cms_tags sekizai_tags and_a_bunch_of_other_stuff %}
<html>
...
<head>
{% render_block "css" %}
</head>
<body>
...
{% addtoblock "js" %}[jquery]{% endaddtoblock %}
{% addtoblock "js" %}[google api, data, more cool stuff like jqplot.]{%endaddtoblock%}
{% addtoblock "js" %}[my site's library js.] {% endaddtoblock %}
{% render_block "js" %}
</body>
</html>
Now in the template loaded for my DjangoCMS custom plugin,
great_calendar_plugin_template.html
{% load sekizai_tags and_a_couple_other_things %}
{% addtoblock "js" %}[plugin javascript file dependency]{%endaddtoblock %}
{% addtoblock "js" %}[plugin javascript file]{% endaddtoblock %}
....
So no matter what I do the plugin javascript files are placed into the final HTML above JQuery and all the other dependencies, rather than underneath where they belong. What am I missing here?
Thanks.