Prior to Django 1.11, all form rendering was handled exclusively in Python code, but in that version template-based form widget rendering was introduced. In this recipe, we will examine how to use custom templates for form widgets, implement custom renderer classes for both forms and widgets, and override a widget template at the project level.
Creating a form layout with custom templates
Getting ready
To demonstrate the capabilities of the Django core form rendering API, let's create a bulletin_board app and put it in INSTALLED_APPS in the settings. If you're using Docker, as described in the Creating a Docker project structure recipe in Chapter 1, Getting Started with Django 2.1, you will also need to add the new...