忽略在夹层中压缩的外部源

Ignore external sources being compressed in mezzanine

尝试在夹层联系人表单模板中加载外部源

例子

{% block extra_js %}
{{ block.super }}    
    <script src="https://www.google.com/recaptcha/api.js" async defer></script>
{% endblock %}

压缩机异常

compressor.exceptions.UncompressableFileError: 'https://www.google.com/recaptcha/api.js' isn't accessible via COMPRESS_URL ('/static/') and can't be compressed

将脚本标签放在 {% extra_head %} 块中,而不是 {% extra_js %} 块中。如果您查看基本模板,您会看到 {% extra_js %} 中的所有内容都通过 {% compress %}:

压缩

https://github.com/stephenmcd/mezzanine/blob/bec6595fc960013aaa4d590d842acff6d206f20b/mezzanine/core/templates/base.html#L34-L39