#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 |
Description
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 https://gist.github.com/1453629. I'm happy to iterate on it, given feedback.
Change History (2)
comment:1 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 13 years ago
http://djangosnippets.org/ is also a good place to upload such utilities.
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!