Login

Snippets by ianreardon

Snippet List

Load static media from secure (SSL) static server (Context Processor)

If you request static files such as images, javascript or css using http rather than https, the browser will complain that your site is not secure. This simple context processor will replace http:// with https:// in your MEDIA_URL if your static files are being included from an https page. In your settings.py just replace 'django.core.context_processors.media' with your new context processor.

  • files
  • ssl
  • context
  • static
  • processor
  • secure
  • content
  • media_url
Read More

ianreardon has posted 1 snippet.