Hi all, I have a custom inclusion tag that renders a template filled with topical data for use in a sidebar. This is used on many pages, but not all, and has some supporting javascript and CSS. Currently all that lives in the tag's template, (incorrectly) inline with the html:
<!-- /app/templates/app/contentbrowser.html --> <style>...</style> <div> <!-- html content goes here ---> </div> <script>...</script> I would like both the CSS and javascript to be external files, and the accompanying <link> and <script> tags to be properly placed in the <head> section of the page. The admin does a similar thing for forms and widgets, but those exist at the view level and are therefore accessible throughout the template via {{ media }}. Because the code in an inclusion tag is only executed when arrived at, though, I don't think I can "go back" and insert the appropriate html into the <head>. The only way I can think to solve this is by having a sister tag that outputs the <link> and <script> tags, called manually where appropriate, but if there were a more elegant way I'd sure like to hear it! Thanks, Scott -- 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.