While investigating https://github.com/Bouke/django-two-factor-auth/issues/243 I noticed that django-formtools suffers from the same issue: missing mangement data causes a ValidationError to be raised in the view, which is uncaught and produces a HTTP 500 response.
This behaviour is unexpected and I think it makes more sense to return a HTTP 400 (Bad Request). Pull request to follow shortly.
While investigating https://github.com/Bouke/django-two-factor-auth/issues/243 I noticed that django-formtools suffers from the same issue: missing mangement data causes a ValidationError to be raised in the view, which is uncaught and produces a HTTP 500 response.
This behaviour is unexpected and I think it makes more sense to return a HTTP 400 (Bad Request). Pull request to follow shortly.