Skip to main content

Redirecting bots to utilize their time better...

Project description


Build Status Coverage Status Release Status

alt text

Inspired by this Nick Craver tweet

We all hate bots, lets admit it. Especially the ones that try to gain access to our most secret endpoints. Well we have an easy solution for your django application. django_spam simply adds common admin urls to url conf so when bots (or human for that matter) try and access them, they will get redirected...

Django 2.0 Django 2.1 Django 2.2 Django 3.0 Django 3.1
Python 3.4 :heavy_check_mark:
Python 3.5 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Python 3.6 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Python 3.7 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Python 3.8 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Python 3.9 :heavy_check_mark: :heavy_check_mark:

To install:

pip install django-spam

Add to apps list:


django_spam ships with some default endpoints bots might try to hit. If you would like to add extra routes, simply add a SPAM_ROUTES variable to your settings file that contains a list of extra endpoints you would like to add. no leading slashes


The same goes for SPAM_URLS you would like traffic to get forwarded to. Add some fun urls:

    # 10 hours of Donald Trump saying bing bing bong
    # 10 hours of Darth Vader breathing

Include django_spam.urls to root url file:

url(r'', include('django_spam.urls')),  # for Django >= 2.0: path('', include('django_spam.urls')),

If for some odd reason you need to exclude routes, define EXCLUDED_ROUTES in settings. no leading slashes



Project details

Download files

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

Files for django-spam, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size django_spam-1.0.0.tar.gz (6.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page