Jan 12 2011

Django template tag to force https URL references

published by David Chandek-Stark
in blog Fragments of Code
original entryDjango template tag to force https URL references

django templates template tags

I needed a hack to munge some included HTML content so that <img>, <input>, <link> and <script> tags to that URL references (href and src attributes in those tags) used https. Here’s what I came up with. It’s not bullet-proof, but seems good enough for the need of the moment. Note that <a> hrefs are […]

Tag cloud


Social Sharing

Feeds