Custom form

Report a typo

Create a form for adding a product to the shopping cart in an online shop.

ProductForm should have the following fields:

  • product, CharField with minimum length of 3 characters
  • quantity, IntegerField
  • price, DecimalField
Write a program in Python 3
from django import forms


class ProductForm(forms.Form):
...

Create a free account to access the full topic