Skip to main content

A tool to analyze Django projects for unused components

Reason this release was yanked:

Not working properly

Project description

Django Project Scrubber

A tool to analyze Django projects for unused components, helping you keep your codebase clean and maintainable.

Features

  • 🔍 Find unused URLs in your Django project
  • 📄 Identify unused templates
  • 🔄 Detect duplicate method names
  • 🧹 Clean up unused code
  • 🚀 Improved URL detection with support for namespaced URLs
  • 📝 Enhanced template analysis with dynamic scanning
  • 🎯 Better console output with positive messages
  • 🔧 Support for Python 3.8 through 3.11

Installation

pip install django-project-scrubber

Usage

django_scrubber /path/to/your/django/project

Project Status

Version 0.1.7 - Enhanced URL and template analysis with improved detection patterns and better console output.

License

MIT License

Author

HappyMinsker - GitHub

How It Works

The Django Project Scrubber analyzes your Django project by:

  1. Scanning all URL patterns in your project
  2. Checking URL usage in templates and code (including namespaced URLs)
  3. Analyzing Django source code for built-in URL and template usage
  4. Analyzing template usage (includes, extends, and view rendering)
  5. Supporting partial templates (files starting with underscore)
  6. Detecting URLs in template attributes (href, form actions)
  7. Identifying templates used in class-based views and error handlers
  8. Marking templates that use URLs as used
  9. Filtering out common false positives (admin, auth, etc.)
  10. Providing a clear summary of potentially unused components

Requirements

  • Python 3.8 or higher
  • Django 3.0 or higher

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

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

Source Distribution

django_project_scrubber-0.1.7.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_project_scrubber-0.1.7-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file django_project_scrubber-0.1.7.tar.gz.

File metadata

  • Download URL: django_project_scrubber-0.1.7.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.2

File hashes

Hashes for django_project_scrubber-0.1.7.tar.gz
Algorithm Hash digest
SHA256 5496e85960cfb6ef7032297f068033aff4d39e4c46a37078938ae8d1e4741eea
MD5 a44d6298073567a5e4c9ea308d04539c
BLAKE2b-256 42482ba18dea5229f6f9e840d8b4effa52116321a6ab5e4480427cd0d67aaabe

See more details on using hashes here.

File details

Details for the file django_project_scrubber-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for django_project_scrubber-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6a8a0b0cc79d5ef09adb5bb72ba360e0ee56a28ed49070f62d8c11b9d2109860
MD5 c9da8428f4b2a4f9f4c2187deee7c3bd
BLAKE2b-256 fa08e3e762d38a8da2329722c06e8c78f979a57c6c191fd012ecafcb48542f0e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page