I am trying to insert data using django forms API but it not working whenever I try to insert data it doesn't insert into the database
Here is my VIews.py
def create_product(request)
if request.method == 'POST':
form = CreateProductForm(request.POST)
if form.is_valid():
p_name = form.cleaned_data['name']
p_cat = form.cleaned_data['category']
p_brand = form.cleaned_data['brand']
…
Top comments (0)