Every Django view function MUST return an HttpResponse object, sometimes we 
just want to send data to the server and  don't want to send data back to the 
client , this probably lead Python users want to return None instead, however , 
this is not allowed in Django view function, I found  HttpResponse(status=204) 
<https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10> may come for 
rescue in this case,  thus it would be better to include 
HttpResponse(status=204) as an HttpResponse subclasses for convenience so that 
could save Django users from asking those returning-null-response questions:
http://stackoverflow.com/questions/17557618/post-without-response-in-django-javascript-interaction
http://stackoverflow.com/questions/2131203/django-no-redirections
http://stackoverflow.com/questions/4123155/how-do-i-send-empty-response-in-django-without-templates

BTW, someone already implemented this feature  here, better to adopt it in 
Django 
http://django-extras.readthedocs.io/en/latest/ref/http-response.html

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/76aefb01-5b00-4df8-9210-4f064ca74aeb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to