How to do it...

To complete the recipe, follow these steps:

  1. Ensure that the template system will be able to find customized templates in our app by adding django.forms to our INSTALLED_APPS, using the DjangoTemplates backend for the TEMPLATES setting, and including the APP_DIRS flag as True for that engine. Aside from adding django.forms, these are the defaults when starting a new project:
# or config/ ...INSTALLED_APPS = [    # ...    'django.forms',]# ...TEMPLATES = [    {        'BACKEND': 'django.template.backends.django.DjangoTemplates ',        'APP_DIRS': True,        # ...    }]
  1. Create BulletinForm in, as follows:
# bulletin_board/forms.pyfrom django import formsfrom django.forms.renderers import TemplatesSettingfrom bulletin_board.models ...

Get Django 2 Web Development Cookbook - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.