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.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

django_nginx_ssi-0.1-py2.6.egg (8.8 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for django-nginx-ssi-0.1.tar.gz
Algorithm Hash digest
SHA256 300dbb330d170cde8107306783ab0bee4078debc78a0a51100b060b4190c5726
MD5 606a874d4cc67117e25458c291e0e829
BLAKE2b-256 c9254b0d58ffb6e847609aac85cb6375258a9ad299d484a7b21f55bc2b425feb

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for django_nginx_ssi-0.1-py2.6.egg
Algorithm Hash digest
SHA256 958a7e0a10e942e28e8c54f170ab527cfb6820a59a58dadf0138187ce47c41f5
MD5 4610e5dee0a89f6ffeecfd0261681fc7
BLAKE2b-256 628008b8442f725622aa259a1c1a1c9bd5fe62ac0d48803ed58e8f8a3530233c

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