Skip to main content

Django SSI library for use with Nginx

Project description

See http://wiki.nginx.org/HttpSsiModule

{% load nginxssi_tags %}
hello
{% nginxssi %}
    <b> okidoki </b> {%now "jS F Y H:i"%} Hello {{foo}}
{% endnginxssi %}
world

Renders inline as:

hello
<!--# include virtual="/nginxssi/a3e5fa678243e0bab620fbca75f6601d/" -->
world

A request to /nginxssi/a3e5fa678243e0bab620fbca75f6601d/ renders:

<b> okidoki </b> 25th January 2011 13:26 Hello bar

Nginx will stitch these two together to form:

hello
<b> okidoki </b> 25th January 2011 13:26 Hello bar
world

How it works

  1. The template is cached in its raw unrendered form

  2. The template string’s md5 hash is used as a cache key

  3. The template’s context is stored with the cache key as a prefix

  4. A request to the SSI url looks up the template and the context in the cache, renders it and returns the HttpResponse

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-nginx-ssi-0.1.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

django_nginx_ssi-0.1.1-py2.6.egg (8.9 kB view details)

Uploaded Source

File details

Details for the file django-nginx-ssi-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-nginx-ssi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b8043773a3db4d80efdffd97d64651401700981381b9bb62ec6ef1ae43522756
MD5 0411ee538fe4bf043f72eaf2845c9a35
BLAKE2b-256 81ae182dab2ae8481e487403aa359a6b7a5cd555e890b02e7b1519f1b53028d9

See more details on using hashes here.

Provenance

File details

Details for the file django_nginx_ssi-0.1.1-py2.6.egg.

File metadata

File hashes

Hashes for django_nginx_ssi-0.1.1-py2.6.egg
Algorithm Hash digest
SHA256 a41f4adbc4d9c8804e131de6e1930b1d0283ac47cd78a75ebe4624fa9ae25357
MD5 c0a6ce7fa376ead3874594db29a0eb0e
BLAKE2b-256 627f84317699b04c6f2022a3827db9d9b8c0d505f429c431934de684076c9583

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page