README
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:
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
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 |
Metadata
Release files for django-unload 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-unload-0.3.3.tar.gz | 18.4 kB | Without provenance | Details for django-unload-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_unload-0.3.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for django_unload-0.3.3-py2.py3-none-any.whl |
Total release size: 38.4 kB
Release files / django-unload-0.3.3.tar.gz
| Download URL | django-unload-0.3.3.tar.gz |
|---|---|
| Size | 18.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b9bbf67203dc371aa89aef7df074960c7f6f3760a6ae7f551d8d2e038cd714c
|
|
BLAKE2b-256 checksum How to use checksums |
627ea36ca9756f2f777e50c1950528d20672af0092c330809f946f5e85de96b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_unload-0.3.3-py2.py3-none-any.whl
| Download URL | django_unload-0.3.3-py2.py3-none-any.whl |
|---|---|
| Size | 20.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b3977d631a1471ea9849d802002db985564684d932e1b2cb8b9ef8495dd39286
|
|
BLAKE2b-256 checksum How to use checksums |
612e55bc5961c9a5b1866727f344b5e9245f44c95e2dfd9b68e191e110277249
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-unload 0.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.