Remove unused custom Django template tags and filters
Project description
Requirements
Python 2.7+, 3.4+
Django 1.8 (1.9 support will be added later)
Tabulate
Setup
Ensure that 'unload' is in your project’s INSTALLED_APPS:
INSTALLED_APPS = [ ... 'unload', ... ]
Usage
The plugin 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.
Scan all template files in the project: $ python manage.py find_unnecessary_loads.
Scan all template files in the specified app: $ 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:
The first table points to duplicate loads;
The second table simply lists unutilized modules, tags and filters;
Example
/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 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_unload-0.3.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85c3fd33400fa5f02aceab7866a2ad5eba9aedb26400b7dfa92017e1def3cf82 |
|
MD5 | a89510922716d8320548a57fc1555861 |
|
BLAKE2b-256 | b460ec4f4cd0fc8b4e029845acb64f7788916264004fb12889181da0bffd5851 |