Skip to main content

This project aims at providing a compromise between dynamic error pages for Django (that use template tags etc and therefore potentially error too) and having to write static error pages by hand.

Project description

This project aims at providing a compromise between dynamic error pages for Django (that use template tags etc and therefore potentially error too) and having to write static error pages by hand.

It does so by providing a management command that can be invoked to turn a dynamic Django template into a static HTML page with no template tags whatsoever in it.

Note that this means that every time you change your error pages, you need to re-run this script. Ideally this is part of your deploy process.

Installation

pip install django-statictemplate inside your virtualenv.

Add statictemplate to your INSTALLED_APPS.

Usage

python manage.py statictemplate dynamic_500.html > 500.html

The management command renders a template given by name (standard Django template name resolution applies) and writes the output to stdout, so you should redirect stdout to a filename.

License

This project is licensed under the BSD license.

Contributors

See https://github.com/ojii/django-statictemplate/contributors

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

Uploaded Source

File details

Details for the file django-statictemplate-1.1.tar.gz.

File metadata

File hashes

Hashes for django-statictemplate-1.1.tar.gz
Algorithm Hash digest
SHA256 a9ade7fc1431d533382912e97d669da009b094378a93b3de543edc98ec5be99d
MD5 d7d45d9e2e77600f71ca37fd4e364c9e
BLAKE2b-256 b9e1b79dba7c8d476d64459046628d36373952ad27ba65ff4e797ea8bc36ce61

See more details on using hashes here.

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