django-nginx-ssi

Django SSI library for use with Nginx
Download

django-nginx-ssi Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Publisher Name:
  • Simon de Haan
  • Publisher web site:
  • http://praekeltfoundation.org

django-nginx-ssi Tags


django-nginx-ssi Description

Django SSI library for use with Nginx django-nginx-ssi is a Django SSI library for use with Nginx.See http://wiki.nginx.org/HttpSsiModule{% load nginxssi_tags %}hello{% nginxssi %} < b > okidoki < /b > {%now "jS F Y H:i"%} Hello {{foo}}{% endnginxssi %}worldRenders inline as:hello< !--# include virtual="/nginxssi/a3e5fa678243e0bab620fbca75f6601d/" -- >worldA request to /nginxssi/a3e5fa678243e0bab620fbca75f6601d/ renders:< b > okidoki < /b > 25th January 2011 13:26 Hello barNginx will stitch these two together to form:hello< b > okidoki < /b > 25th January 2011 13:26 Hello barworldHow it works1. The template is cached in its raw unrendered form2. The template string's md5 hash is used as a cache key3. The template's context is stored with the cache key as a prefix4. A request to the SSI url looks up the template and the context in the cache, renders it and returns the HttpResponse Requirements: · Python · Django


django-nginx-ssi Related Software