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 hashes)

Uploaded Source

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