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

django-unload is a maintenance application used for performing template cleanup. It is used primarily as a command-line tool that scans the entire project or the specified app and returns the results in a tabular format.

Installation

Requirements

  • Python 2.7+, 3.4+
  • Django 1.8 (1.9 support will be added later)
  • Tabulate

Installation

To install the package, type:

$ pip install django-unload

Setup

Ensure that 'unload' is in your project’s INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    'unload',
    ...
]

User Guide

django-unload is used as a command line tool. It can either be used to scan all template files in the project or the templates in the specified Django app.

In order for the plugin to function properly, all third-pary packages located in the INSTALLED_APPS setting (e.g. django-debug-toolbar) should be installed using pip. django-unload uses pip to differentiate between the project’s templates and the templates of packages located in the installed apps (e.g. admin templates).

Scan the project

To scan all template files in the project, type:

$ python manage.py find_unnecessary_loads.

Scan an app

To scan a specific app, type:

$ python manage.py find_unnecessary_loads --app <app_name>.

Output

The output is sent to the console. Although all template files are scanned, only templates with issues and the issues in question are displayed. The issues are displayed in two tables:

  1. The first table points to duplicate loads;

    Duplicate module Duplicate tag/filter Line number
    some_module   10, 23
    some_other_module some_tag 14, 47
  2. The second table simply lists unutilized modules, tags and filters;

    Unutilized module Unutilized tag/filter
    some_module some_tag
    some_other_module some_filter

WARNING: If you get a TemplateSyntaxError, the template in question is probably outdated and/or has not been used in a while.

Example Output

/path/to/template.html

Duplicate module Duplicate tag/filter Line number
some_module   10, 23
some_other_module some_tag 14, 47
Unutilized module Unutilized tag/filter
some_module some_tag
some_other_module some_filter
Release History

Release History

0.3.3

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

0.3.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

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_unload-0.3.3-py2.py3-none-any.whl (20.0 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Sep 13, 2016
django-unload-0.3.3.tar.gz (18.4 kB) Copy SHA256 Checksum SHA256 Source Sep 13, 2016

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