Form data not clearing after submit in django
<p>After I click submit button still the form data exists<br>
My views.py file,</p>

<pre><code>def add_prod(request):

    form = ProdForm(request.POST or None,request.FILES or None)
    my_products = Add_prod.objects.all()
    context = {
            "form":form,
            "products":my_products
    }

    if form.is_valid():
        instance = form.save(commit=False)
        book = form.cleaned_data.get("book")
        author = form.cleaned_data.get("author")
        price = form.cleaned_data.get("price")
        cat = form.cleaned_data.get("cat")
        image = form.cleaned_data.get("image")
        instance.book = book
        instance.author = author
        instance.price = price
        instance.cat = cat
        instance.image = image
        instance.save()

        form = ProdForm()
        messages.add_message(request, messages.INFO,'Product Added')

    return render(request,"add-prod.html",context)
</code></pre>

<h1>Add_prod is the name of the model class</h1>

<h1>ProdForm is the name of the class defined in forms file</h1>