view create function(addanother)

Hello everyone, I hope someone can help me. I want to create a view like (addanother ) view in admin. But I my view don’t save my form value. What is wrong and How can I do?
my view function is:

def dpot_readd(request):

if request.method == 'POST':

    form = DepotForm(request.POST or None)

    if  form.is_valid():

        messages.success(request, 'Success')

        return render(request, 'Creates/depot_create.html', {'form': form, 'year'})


    form = DepotForm()

    return render(request, 'Creates/depot_create.html', {'form': form, 'year'})

You would probably find it helpful to render any error messages from your form to see why it’s not being saved.

I suggest reviewing the Working with Forms page, particularly the section on Rendering form error messages.