I ask this question knowing that it's almost anti-django template patterns, but I ask after spending the last few hours trying to figure a way to shoe horn this functionality in. The basic idea is that I would like to say something like this:

{% extends "base.html" %}
{% block content %}
{% extendgroup javascript "foo.js" %}
{% extendgroup javascript "bar.js" %}
... more block content ...
{% endblock %}

=== base.html
...
  {% extendgroup javascript %}
<script src="{{ item }}"></script>
  {% endextendgroup %}

I've attempted to attache the list of javascript files to
     Node -- cant' since there is no Signal for begin template rendering
    parser -- wrong lifecycle
    context -- the extend block is rendered with some local variables.

The only thing left is to promote "extendgroup" to be the parallel to "extends" and render it's children... Though this really isn't my goal.

Any suggestions or other thoughts of how a template can append to a list of resources to be used.

--koblas

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to