Complete the code to import the Django forms module.
from django import [1]
The forms module is used to create form classes in Django.
Complete the code to define a form class named ContactForm inheriting from Django's base form class.
class ContactForm([1]): pass
Form classes inherit from forms.Form to create custom forms.
Fix the error in the form field definition to create a CharField with a max length of 100.
class ContactForm(forms.Form): name = forms.CharField([1]=100)
The correct argument for character length limit is max_length.
Fill both blanks to define an EmailField with a required attribute set to True.
class ContactForm(forms.Form): email = forms.[1](required=[2])
EmailField is used for email input and required=True makes the field mandatory.
Fill all three blanks to define a form with a CharField named username, a PasswordInput widget, and a max length of 30.
class UserForm(forms.Form): username = forms.[1](max_length=[2], widget=forms.[3]())
The username field is a CharField with max_length 30 and uses PasswordInput widget for hidden input.