{% load compress %}
{% compress js %}
<script src="/media/js/one.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">obj.value = "value";</script>
{% endcompress %}
when using this:
https://github.com/dziegler/django-css#readme
or have you something more advanced in your mind (beside the fact that your template's way shorter...)?
I'd like to encourage you to try out django_compressor for filtering purposes (the 0.6a10 from Github which is slated for release soon [1]).
http://django_compressor.rtfd.org/
Jannis
Looking at the desolate and inconsistent state the current plugins media framework is right now and how most plugins either dont use it or use it improperly, i propose a non-backwards compatible change to happen in 2.2, rather than 2.3, by dropping the existing media framework now.
My proposed sekizai implementation would require users to provide at least the "js" and "css" sekizai-namespaces. This would of course be thoroughly documented.
Thoughts?
I don't like the idea of having to define stuff in your templates for the cms to work at all, butI see how useful it is: I guess it requires at least extremely good error messages ("you don't have a css block defined, please define one as per <link to docs>"...).
Do we have a way to check templates for correctness on server startup for instance? Just throwing ideas here, even if it sounds impractical.
---
Sent from my Android mobile