BlockTorMiddleware is a middleware to automatically block users from Tor network. If user enter from Tor network, 404 page will be returned. I urge you to not use this middleware unless you have too. I wrote this middleware due to lot of spamming from Tor network on my website.
Go to the root of your django project and download this package:
git clone https://github.com/Ahmed/django-block-tor.git
Install the missing requirement:
pip install -r requirements.txt
Add "BlockTorMiddleware" at the end of MIDDLEWARE_CLASSES setting like this:
MIDDLEWARE_CLASSES = ( ... 'django-block-tor.blocktor.BlockTorMiddleware' )That's it ;)