Django Forms in 100 words
Series: X in 100 words
Django Forms primarily perform two functions within a Django application. They can render html fields and related tags like labels and legends and they can also validate and process data submitted to a view.
In terms of a codebase they typically live in their own file, forms.py
.
Forms are the most common entry point to business logic which is normally going to be saving some processed data to the database. This keeps what is happening from a view to a form to one or more models clear and explicit, which leads to easier readability and maintainablity. Essentially your future self or teammates will thank you.