I am working on a DjangoCMS plugin that includes a javascript file for myself. The Javascript plugin relies on the same libraries as the rest of the site. So, here is 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 library js.] {% endaddtoblock %} {% render_block "js" %} </body> </html>
Now in the template downloaded for my custom DjangoCMS 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 javascript files of the plugin are placed in the final HTML above jQuery and all other dependencies, and not under them where they belong. What am I missing here?
Thanks.
django django-cms django-sekizai
Zak patterson
source share