Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A collection of random Django utilities

Project Description

Django Muckraking

A collection of various Django utilities. It includes:


Removes spaces and line breaks between html tags. Leaves <script> blocks intact

An apache-like approach to redirects.

Specify your redirects in like this::

(r'^/about/news-events\.php(.+)?', '/news-events/$1',),
(r'^/about/(?!index\.php)', '/about/',),

Template Context Processors

Add a :code:`{{ DEBUG }}` variable Django templates. The value is a boolean

Standard Template Tags

To use the following tags, add :code:`{% load muckraking_tags %}` to your template.

:code:`{% version_hash %}`
Outputs either the Git HEAD commit hash, or a hash of the atime value of the Django settings module. It first tries to output the Git commit hash. If unsuccessful, it falls back to the settings module file time hash.

:code:`{% git_commit_hash %}`
Outputs the commit hash of the HEAD commit in a git repo. Useful for cache-busting strings.

:code:`{% settings_file_time_hash %}`
Outputs a hash of the atime meta value of the Django settings module file. Useful for cache-busting strings.

Django CMS Template Tags

To use the following tags, add :code:`{% load muckraking_cms_tags %}` to your template.

:code:`{% page_url_by_slug "foobar-page" %}`
Allows you to perform reverse lookups on pages by slug::

Management Commands

Allows you to import a csv file of redirect urls into the redicet app::

./ import_redirects ~/path/to/redirects.csv

Release History

This version
History Node


History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(5.2 kB) Copy SHA256 Hash SHA256
Source None Oct 26, 2014

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers