Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#17372 closed New feature (wontfix)

Sleep middleware

Reported by: josharian Owned by: nobody
Component: Core (Other) Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


It is useful to be able to simulate slow response times from a server -- for example, to see what a mobile client ui will look like when the connection is poor.

A sleep-every-request middleware makes that very easy. The middleware is easy to write, but given how common a task it is, it might be worth having packaged with Django contrib.

To put code where my mouth is, a first cut implementation, which I happily place in the public domain, is at I'm happy to iterate on it, given feedback.

Change History (2)

comment:1 Changed 8 years ago by Carl Meyer

Resolution: wontfix
Status: newclosed

Hi, and thanks for the contribution.

Generally, the leaning has been towards making contrib smaller, not larger, and the bar for adding something is quite high - it has to be the de facto standard implementation of a very common pattern. Although this middleware could be quite useful, I don't think it meets the bar for contrib. Fortunately, there's an active ecosystem of third-party reusable Django libraries, installable with pip from the Python Package Index, and I think this would fit right in to that larger ecosystem. I'd encourage you to package it up, put it on PyPI, and see if it gains some traction.

Thanks again!

comment:2 Changed 8 years ago by Aymeric Augustin is also a good place to upload such utilities.

Note: See TracTickets for help on using tickets.
Back to Top