In my settings for compressor I'm using SlimIt for most of my javascript:
COMPRESS_JS_FILTERS = ['compressor.filters.jsmin.SlimItFilter', ]
Some of my js files shouldn't go through SlimIt though because the file is already minified, or the javascript throws some error when its minified with other files. My template block ends up looking like this:
{# code that I minify #}
{% block compressed_libs %}
{% compress js %}
<script src="/static/js/compress_this.js"></script>
<script src="/static/js/also_compress_this.js"></script>
...
{% endcompress %}
{% endblock %}
{# code that shouldn't minify #}
{% block non-compressible_libs %}
<script src="/static/js/already.min.js"></script>
<script src="/static/js/breaks-everything.js"></script>
{% endblock %}
Can I set different compress filter rules for different blocks/files so that my "non-compressible" files can still be concatenated together by compressor while skipping SlimIt?
Category web content filtering is used to block websites based on content categories such as pornography, violence, hate, and social networking sites.
You can apply filters to a page report so as to narrow down the data displayed in the report. The filters can be applied to the business views used by data components such as banded objects, tables, crosstabs and charts in the report, or to the data components themselves.
apply_filters($tag,$value); allows you to create a place in your code where you can then allow the $value you pass to be hooked into and modified by using add_filter();
The process of adding a filter includes two steps. First, you need to create a Callback function which will be called when the filter is run. Second, you need to add your Callback function to a hook which will perform the calling of the function.
In some cases, you can use more than one filter in a single compressor to target many particulates. Each type is applicable as an inline air compressor filter, which attaches to the air output on your tank and catches particulates before they move on to your pneumatic tools.
Several elements contribute to how to choose an inline filter for your air compressor. One of the more significant factors is the type of compressor you’re using. Each variety will have specific requirements and fittings, and if you want the best results, it’s essential to find the most secure and proper fit.
There is no out-of-the-box feature in Power BI to disable filter for only 1 page. You can either have this filter as 'Page level Filter' on all pages or use ALL for this column (filter) for the measures on that single page. 03-30-2020 01:15 AM
If your compressor doesn’t have one, installing one is essential. Intake filters pull out some of the harsher particulates, protecting the internal components of your processor, and clean the air before the pump releases it into the compressor system.
As approxiblue said, it doesn't look there's a way to specify which filters to use per compress block in a template (in Compressor 1.5).
I'll update this answer someone comes up with something.
It seems like this could be solved by adding a parameter to the compress
template tag to allow it to return a CompressorNode
with a flag to skip the filter in base.py hunks()
I'll see what the Compressor community thinks about this, but let me know if you have any ideas.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With