.. _intro: Django-4.0 introduced a long awaited feature to render form fields using a template. Until version 3.2 this was left to the infamous function ``BaseForm._html_output()``, which rendered the form fields hard-coded in HTML and hence there was little scope for modification. This new feature now makes it possible to write special renderers for adding functionality as implemented by this library. ============ Introduction ============ **django-formset** tries to solve a problem, which occurs in almost every project using the Django framework: The way forms are handled. Compared to the solutions most modern JavaScript frameworks offer nowadays, having to reload a page if a form does not validate, is *not* contemporary anymore. Therefore, Django developers often use a combination of one of these client frameworks together with the `Django REST framework`_, which then indeed provides a much better User eXperience. However, those JavaScript frameworks impose their own way of getting stuff done and usually don't share the same mindset with Django. For instance, in Django we distinguish between `bound and unbound forms`_. This concept however doesn't make sense in most JavaScript frameworks, and hence is not implemented. We therefore often must work around those problems, which leads to cumbersome and un-`DRY`_ solutions. .. _Django REST framework: https://www.django-rest-framework.org/ .. _bound and unbound forms: https://docs.djangoproject.com/en/stable/ref/forms/api/#bound-and-unbound-forms .. _DRY: https://www.artima.com/articles/orthogonality-and-the-dry-principle With **django-formset** we get a `web component`_ explicitly written to handle Django forms and collections of forms (hence "formset") *with* the User eXperience only modern JavaScript frameworks can offer. This means that fields are validated by the client, giving immediate feedback on invalid field values. If the form's content then is sent to the server and fails to validate there, those error messages are sent back to the client and show up nearby the fields containing invalid data. Giving feedback on a form which did not validate doesn't require a page reload anymore. The nice thing about this approach is, that we **can reuse all of our current Django forms** (unaltered), **can use our existing Django views** (with a small modification), but **neither have to add any extra code nor endpoints to the URL routing** of our application. .. _web component: https://developer.mozilla.org/en-US/docs/Web/Web_Components .. _forms_as_logical_entities: Use Forms as Logical Entities ============================= The **django-formset** library separates the logical layer of a Django Form_ from their HTML entity ``