#22591: Changing of HTTP status code in form_invalid()
-----------------------------+--------------------------------------
     Reporter:  kevmo314@…   |                    Owner:  nobody
         Type:  New feature  |                   Status:  closed
    Component:  Forms        |                  Version:  master
     Severity:  Normal       |               Resolution:  wontfix
     Keywords:  forms        |             Triage Stage:  Unreviewed
    Has patch:  1            |      Needs documentation:  0
  Needs tests:  0            |  Patch needs improvement:  0
Easy pickings:  1            |                    UI/UX:  0
-----------------------------+--------------------------------------

Comment (by Thomas Güttler):

 http status code "200" on POST and invalid data is a bit strange. Django
 does this since ages, nevertheless I think there should at least be simple
 way to specify a different http status code.

 Maybe give [https://docs.djangoproject.com/en/2.2/ref/class-based-views
 /mixins-editing/#formmixin FormMixin] an overwritable attribute
 http_status_on_invalid. This
 should default to the old "200", but would allow subclasses to overwrite
 it easily without coding.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/22591#comment:3>
Django <https://code.djangoproject.com/>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/076.27508b03b2c4b9b6b631df2c056aaa7c%40djangoproject.com.

Reply via email to