Stuck With Django Form Validation
I'm trying to get validation running on a django form used to retrieve a list of objects in a ListView View. Despite having read django docs and many other questions here, I can't
Solution 1:
The default a FormView will only process the form on POST; the GET is for initially displaying the empty form. So you need to use method="post"
in your template form element.
Your action
attribute is also suspect; it needs to point to the URL of the form view. If that actually is the URL, note it's not usual to use extensions like ".html" in Django URLs, and I would recommend not doing so.
Post a Comment for "Stuck With Django Form Validation"