Opened 15 years ago

Closed 15 years ago

#9943 closed (wontfix)

Implement the rest of the HTTP require_* decorators and HttpResponse* classes

Reported by: Zach Hirsch Owned by: nobody
Component: HTTP handling Version: 1.0
Severity: 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

Hi,

I've been using Django to implement a few JSON web services, and I've found myself writing the (trivial) require_PUT, require_DELETE, etc. decorators to parallel those already defined in django/views/decorators/http.py. I've also found myself writing the (again, trivial) HttpResponseCreated, HttpResponseNoContent, etc. classes to parallel those in django/http/__init__.py.

I think it would be nice if these were built-in to Django, since they're easy to write, don't cause much overhead, and are pretty useful to have. Rather than cherry-pick the ones that I've used, or the ones that I think would be most useful, I've just done through the HTTP RFC and added them all. A patch is attached.

Thanks,
-Zach

Attachments (1)

http-methods-and-statuses.diff (5.7 KB ) - added by Zach Hirsch 15 years ago.

Download all attachments as: .zip

Change History (2)

by Zach Hirsch, 15 years ago

comment:1 by Alex Gaynor, 15 years ago

Resolution: wontfix
Status: newclosed

I'm won't fixing this since:

a) It's dealing with 2 issues, please open 1 ticket per issue.
b) Django doens't need to contain a class for every possible http status code, you are more than welcome to use whatever you like within your own code.

If you'd like feel free to open a seperate ticket for the decorators, although it is my inclination that that will, and should be, won't fixed as well.

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