awesto / djangoshop-stripe

Stripe Payment Provider Integration for django-shop
MIT License
12 stars 9 forks source link

UncompressableFileError: 'https://js.stripe.com/v2/' isn't accessible via COMPRESS_URL #8

Closed racitup closed 6 years ago

racitup commented 6 years ago

I'm using django-compressor on the js sekizai block in production and get this error:

UncompressableFileError: 'https://js.stripe.com/v2/' isn't accessible via COMPRESS_URL ('/static/') and can't be compressed

I'm assuming it's caused by the following line in stripe-creditcard-form.html:

{% addtoblock "js" %}<script src="https://js.stripe.com/v2/" type="text/javascript"></script>{% endaddtoblock %}

The obvious solution is to add it to the ext-js block instead, but is there an easier way than copying the template? At the moment I can't find where the template is included...

jrief commented 6 years ago

external URLs can't be concatenated by Selizai. Therefore I used {% addtoblock "ext-js" %} in former versions. This however was not an ideal solution. Now I use {% render_block "js" postprocessor "shop.sekizai_processors.compress" %}, which does the job.

racitup commented 6 years ago

Thanks! I must have missed changing this from {% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %} when upgrading from a previous version.