back to all projects

Django Blocklist

Django app that implements IP-based blocklisting. Its BlocklistMiddleware performs the blocking, and its clean_blocklist management command deletes entries which have satisfied the cooldown period.

Django Blocklist | Screenshot
Visit Website
0

Summary

This page is the README.md file for a Django app called django-blocklist, hosted on GitLab. It provides detailed information about the app's functionality, installation, usage, configuration, and development.

Target Audience

Django developers who need to implement IP-based blocklisting in their applications, especially in environments where server-level blocking isn't available.

Key Features

  • IP-based blocklisting via Django middleware.
  • Management commands for cleaning, importing, removing, reporting, searching, and updating the blocklist.
  • Configuration options for cooldown periods, cache TTL, and denial templates.
  • Utility methods for programmatically managing the blocklist.

Pain Points

  • Provides a solution for IP-based blocking when server-level blocking is not an option.
  • Simplifies the management of blocked IPs through management commands and utility functions.
  • Offers customization options for cooldown periods and denial responses.

Usage Instructions

  1. Install the django-blocklist package from PyPI.
  2. Add 'django_blocklist' to INSTALLED_APPS in your Django settings.
  3. Add 'django_blocklist.middleware.BlocklistMiddleware' to MIDDLEWARE in your Django settings.
  4. Run python manage.py migrate.
  5. Add IPs to the blocklist using management commands, utility functions, or the admin interface.
  6. Set up a cron job to run manage.py clean_blocklist daily.

Comments

To comment on this project please signup or login .

by Rasul

TuxSEO - Ad

AI-Powered Blog Content Generation.