Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2013-05-19 Thread Django
#12747: Custom HTTP status reason phrases are not supported
-+-
 Reporter:  Gustavo  |Owner:  gisle
 Type:  New feature  |   Status:  closed
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  http status, http| Triage Stage:  Accepted
  status reason, http status reason  |  Needs documentation:  0
  phrase |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by Aymeric Augustin ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"cb86f707a04e5635817d5f37a1443f9bf7d6af21"]:
 {{{
 #!CommitTicketReference repository=""
 revision="cb86f707a04e5635817d5f37a1443f9bf7d6af21"
 Fixed #12747 -- Made reason phrases customizable.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2013-05-19 Thread Django
#12747: Custom HTTP status reason phrases are not supported
-+-
 Reporter:  Gustavo  |Owner:  gisle
 Type:  New feature  |   Status:  new
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  http status, http| Triage Stage:  Accepted
  status reason, http status reason  |  Needs documentation:  0
  phrase |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by aaugustin):

 I'd like to stop seeing pull requests about this.

 If you want to do it, this is how:
 https://github.com/django/django/pull/1154

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2013-04-29 Thread Django
#12747: Custom HTTP status reason phrases are not supported
-+-
 Reporter:  Gustavo  |Owner:  gisle
 Type:  New feature  |   Status:  new
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  http status, http| Triage Stage:  Accepted
  status reason, http status reason  |  Needs documentation:  0
  phrase |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by ikame):

 For the API of my company we use this feature in a lot of places.
 One of the use cases is:
 We have a {{{courses}}} resource, if the teacher tries to {{{DELETE}}} a
 course with enrolled users, we return a {{{400 Cannot delete course with
 students}}} response.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2013-04-29 Thread Django
#12747: Custom HTTP status reason phrases are not supported
-+-
 Reporter:  Gustavo  |Owner:  gisle
 Type:  New feature  |   Status:  new
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  http status, http| Triage Stage:  Accepted
  status reason, http status reason  |  Needs documentation:  0
  phrase |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by aaugustin):

 #20328 is a duplicate.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2013-04-11 Thread Django
#12747: Custom HTTP status reason phrases are not supported
-+-
 Reporter:  Gustavo  |Owner:  gisle
 Type:  New feature  |   Status:  new
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  http status, http| Triage Stage:  Accepted
  status reason, http status reason  |  Needs documentation:  0
  phrase |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by Paul McNett ):

 This is hackish, quickly written, and tested for only 10 minutes or so but
 I implemented custom status codes by monkeypatching the
 django.core.handlers.wsgi.STATUS_CODE_TEXT dict like:

 {{{
 #!python
 import django.core.handlers.wsgi as wsgi

 class NextDict(dict):
 def __init__(self, *args, **kwargs):
 self._nextdict = {}
 super(NextDict, self).__init__(*args, **kwargs)

 def set_next(self, key, value):
 """
 The next time this key is queried, return the passed value.
 After that, use the default.
 """
 self._nextdict[key] = value

 def __getitem__(self, key):
 if key in self._nextdict:
 v = self._nextdict[key]
 del(self._nextdict[key])
 return v
 return super(NextDict, self).__getitem__(key)

 wsgi.STATUS_CODE_TEXT = NextDict(wsgi.STATUS_CODE_TEXT)
 }}}

 And then when I want my response to have a custom message for it's status
 code:

 {{{
 #!python
 class MyView(request):
 wsgi.STATUS_CODE_TEXT.set_next(200, "hello")
 return HttpResponse("hello again")
 }}}

 I googled for similar ideas and didn't find anyone doing this, so I
 thought it may give someone some ideas to develop this into a plugin or
 something. It wouldn't add overhead to the default (and reasonable)
 implementation, but would help some of us satisfy our requirements easily
 and without adding too much extra overhead...

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2013-04-04 Thread Django
#12747: Custom HTTP status reason phrases are not supported
-+-
 Reporter:  Gustavo  |Owner:  gisle
 Type:  New feature  |   Status:  new
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  http status, http| Triage Stage:  Accepted
  status reason, http status reason  |  Needs documentation:  0
  phrase |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by Gustavo):

 Hi, aaugustin.

 Replying to [comment:14 aaugustin]:
 > Actually, since this isn't a particularly useful feature, and I don't
 expect anyone to ever need it, it'd be nice if it didn't have any
 overhead.

 What do you mean by "overhead"? I think a new keyword argument would be
 cleaner, but I'm happy to update update the patch in either direction.
 Which is the approach you prefer?

 Thanks.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2013-03-18 Thread Django
#12747: Custom HTTP status reason phrases are not supported
-+-
 Reporter:  Gustavo  |Owner:  gisle
 Type:  New feature  |   Status:  new
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  http status, http| Triage Stage:  Accepted
  status reason, http status reason  |  Needs documentation:  0
  phrase |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by aaugustin):

 Actually, since this isn't a particularly useful feature, and I don't
 expect anyone to ever need it, it'd be nice if it didn't have any
 overhead.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2013-03-18 Thread Django
#12747: Custom HTTP status reason phrases are not supported
-+-
 Reporter:  Gustavo  |Owner:  gisle
 Type:  New feature  |   Status:  new
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  http status, http| Triage Stage:  Accepted
  status reason, http status reason  |  Needs documentation:  0
  phrase |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by aaugustin):

 I couldn't care less about this feature request, but the approach shown in
 the patch looks all right.

 I don't have an opinion on using a string or a tuple or a new keyword
 argument to pass the status text.

 The patch is out of date; otherwise, in the interest of crossing one
 ticket off the list, this is RFC.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2012-10-20 Thread Django
#12747: Custom HTTP status reason phrases are not supported
-+-
 Reporter:  Gustavo  |Owner:  gisle
 Type:  New feature  |   Status:  new
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  http status, http| Triage Stage:  Accepted
  status reason, http status reason  |  Needs documentation:  0
  phrase |  Patch needs improvement:  0
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by claudep):

 * needs_better_patch:  1 => 0
 * version:  1.1 => master


Comment:

 Just attached an updated patch. I choose to pass a tuple as the status
 argument, instead of a string that has to be parsed, which is always
 fragile.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2011-05-05 Thread Django
#12747: Custom HTTP status reason phrases are not supported
-+-
   Reporter:  Gustavo|  Owner:  gisle
   Type:  New| Status:  new
  feature|  Component:  HTTP handling
  Milestone: |   Severity:  Normal
Version:  1.1|   Keywords:  http status, http
 Resolution: |  status reason, http status reason
   Triage Stage:  Accepted   |  phrase
Needs documentation:  0  |  Has patch:  1
Patch needs improvement:  1  |Needs tests:  0
 |  Easy pickings:  0
-+-
Changes (by patchhammer):

 * needs_better_patch:  0 => 1
 * easy:   => 0


Comment:

 0002-Test-that-the-custom-response-shows-up-on-the-WSGI-l.patch fails to
 apply cleanly on to trunk

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2011-04-02 Thread Django
#12747: Custom HTTP status reason phrases are not supported
-+-
   Reporter:  Gustavo|Owner:  gisle
   Type:  New|   Status:  new
  feature|Component:  HTTP handling
  Milestone: | Severity:  Normal
Version:  1.1| Keywords:  http status, http
 Resolution: |  status reason, http status reason
   Triage Stage:  Accepted   |  phrase
Needs documentation:  0  |Has patch:  1
Patch needs improvement:  0  |  Needs tests:  0
-+-
Changes (by mattmcc):

 * type:   => New feature
 * severity:   => Normal


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2011-03-21 Thread Django
#12747: Custom HTTP status reason phrases are not supported
-+-
   Reporter:  Gustavo|Owner:  gisle
 Status:  new|Milestone:
  Component:  HTTP   |  Version:  1.1
  handling   | Keywords:  http status, http
 Resolution: |  status reason, http status reason
   Triage Stage:  Accepted   |  phrase
Needs documentation:  0  |Has patch:  1
Patch needs improvement:  0  |  Needs tests:  0
-+-
Changes (by akvadrako):

 * cc: akvadrako (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2010-03-04 Thread Django
#12747: Custom HTTP status reason phrases are not supported
+---
  Reporter:  Gustavo| Owner:  gisle 

Status:  new| Milestone:

 Component:  HTTP handling  |   Version:  1.1   

Resolution: |  Keywords:  http status, http status 
reason, http status reason phrase
 Stage:  Accepted   | Has_patch:  1 

Needs_docs:  0  |   Needs_tests:  0 

Needs_better_patch:  0  |  
+---
Comment (by russellm):

 @Gustavo:

 Is there any condition under which the existing implementation will raise
 an error or cause data loss in the absence of a custom status message?

 Is there any standard that is violated by not allowing a custom status
 message?

 The answer to both of these questions is No. Therefore, this isn't a bug
 fix. It's a feature request.

 It may be an extremely useful new feature, but that doesn't change the
 fact that it is still a feature, and Django 1.2 is feature frozen.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2010-03-04 Thread Django
#12747: Custom HTTP status reason phrases are not supported
+---
  Reporter:  Gustavo| Owner:  gisle 

Status:  new| Milestone:

 Component:  HTTP handling  |   Version:  1.1   

Resolution: |  Keywords:  http status, http status 
reason, http status reason phrase
 Stage:  Accepted   | Has_patch:  1 

Needs_docs:  0  |   Needs_tests:  0 

Needs_better_patch:  0  |  
+---
Comment (by Gustavo):

 Replying to [comment:5 ubernostrum]:
 > 1.2 is feature-frozen, moving this feature request off the milestone.

 This can hardly be a feature. It's a fix for partially broken HTTP
 support.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2010-02-23 Thread Django
#12747: Custom HTTP status reason phrases are not supported
+---
  Reporter:  Gustavo| Owner:  gisle 

Status:  new| Milestone:

 Component:  HTTP handling  |   Version:  1.1   

Resolution: |  Keywords:  http status, http status 
reason, http status reason phrase
 Stage:  Accepted   | Has_patch:  1 

Needs_docs:  0  |   Needs_tests:  0 

Needs_better_patch:  0  |  
+---
Changes (by ubernostrum):

  * milestone:  1.2 =>

Comment:

 1.2 is feature-frozen, moving this feature request off the milestone.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2010-02-23 Thread Django
#12747: Custom HTTP status reason phrases are not supported
+---
  Reporter:  Gustavo| Owner:  gisle 

Status:  new| Milestone:  1.2   

 Component:  HTTP handling  |   Version:  1.1   

Resolution: |  Keywords:  http status, http status 
reason, http status reason phrase
 Stage:  Accepted   | Has_patch:  1 

Needs_docs:  0  |   Needs_tests:  0 

Needs_better_patch:  0  |  
+---
Changes (by gisle):

  * needs_tests:  1 => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2010-02-22 Thread Django
#12747: Custom HTTP status reason phrases are not supported
+---
  Reporter:  Gustavo| Owner:  gisle 

Status:  new| Milestone:  1.2   

 Component:  HTTP handling  |   Version:  1.1   

Resolution: |  Keywords:  http status, http status 
reason, http status reason phrase
 Stage:  Accepted   | Has_patch:  1 

Needs_docs:  0  |   Needs_tests:  1 

Needs_better_patch:  0  |  
+---
Changes (by gisle):

  * needs_tests:  0 => 1

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2010-02-22 Thread Django
#12747: Custom HTTP status reason phrases are not supported
+---
  Reporter:  Gustavo| Owner:  gisle 

Status:  new| Milestone:  1.2   

 Component:  HTTP handling  |   Version:  1.1   

Resolution: |  Keywords:  http status, http status 
reason, http status reason phrase
 Stage:  Accepted   | Has_patch:  1 

Needs_docs:  0  |   Needs_tests:  0 

Needs_better_patch:  0  |  
+---
Changes (by gisle):

  * owner:  nobody => gisle

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12747: Custom HTTP status reason phrases are not supported

2010-02-04 Thread Django
#12747: Custom HTTP status reason phrases are not supported
+---
  Reporter:  Gustavo| Owner:  nobody

Status:  new| Milestone:  1.2   

 Component:  HTTP handling  |   Version:  1.1   

Resolution: |  Keywords:  http status, http status 
reason, http status reason phrase
 Stage:  Accepted   | Has_patch:  1 

Needs_docs:  0  |   Needs_tests:  0 

Needs_better_patch:  0  |  
+---
Changes (by Alex):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.