Usage of sleep()
Django is asynchronous, meaning it does not create a thread to handle each request in a blocking fashion.
Whereas the README mentions
lightweight, designed not to slow down your website a single bit, you use sleep in your middleware.
This function will put the thread to sleep, delaying all the requests it is supposed to handle. Furthermore, if the traffic used by miserable users alone is sufficient, your website can go down indefinitely by putting itself to sleep.
Your middleware is an explicit DoS feature.