This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
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.

Configuration

django-statictemplate does not require any configuration. by default.

By default django-statictemplate overrides the configured middlewares for enhanced compatibility and to avoid incompatibilities.

However this may not be always feasible: if you need a specific set of middlewares to be loaded set:

STATICTEMPLATE_OVERRIDE_MIDDLEWARE = False

in you settings files.

Please note that django-statictemplate has not been tested with every possible middleware, thus you may encounter failures and strange behaviors especially fi you use middlewares that changes the response type.

Usage

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

or

python manage.py statictemplate dynamic_500.html -f 500.html

The management command renders a template given by name (standard Django template name resolution applies) and writes the output to stdout or to a file.

Arguments

  • template: standard django template name to render
  • language: sets the client django_language cookie to render page in the given language
  • extra_request: extra parameters injected in the request. Parameters must be serialized in querystring format (e.g.: 'variable=value&variable=value'; please note the single quote to protect ampersand &).

Options

  • -f, --file: file destionation for command output

License

This project is licensed under the BSD license.

Release History

Release History

2.0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_statictemplate-2.0.1-py2.py3-none-any.whl (5.7 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jun 15, 2015
django-statictemplate-2.0.1.tar.gz (4.4 kB) Copy SHA256 Checksum SHA256 Source Jun 15, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting