delay_middleware — Middleware for testing how your app behaves with latency¶
-
class
DelayMiddleware
(get_response)¶ Bases:
object
To use this, you must add the following to your settings:
- Add
django_cradmin.delay_middleware.DelayMiddleware
toMIDDLEWARE_CLASSES
. - Set
DJANGO_CRADMIN_DELAY_MIDDLEWARE_MILLISECONDS
to the number of milliseconds delay you want to add to all requests (I.E.: 2000 for 2 seconds).
- Add