Mosquito middleware helps you set limit of visiting you django for each user
pip install djangomosquito
import it inside middleware in django settings
middlewares = [
...,
'djangomosquito.middleware.DjangoMosquito',
...,
]
This middleware do it job you just need to set limit number and by setting the limit number after reaching this number user get banned from your website for 1 day
settings.py
# after 100 requests user get banned
LIMIT_MOSQUITO = 100