Django How can I upload a csv file?

I do that :

With that whenf i click on Envoyée , i do'nt have modal for choice my csv file . Can you help me please ?

forms.py

    class CSVUploadForm(forms.Form):
        csv_file = forms.FileField()

views.py

      def upload_csv(request):
            form = forms.CSVUploadForm(instance=request.user)
            if request.method == 'POST':
                form = CSVUploadForm(request.POST, request.FILES, instance=request.user)
                if form.is_valid():
                    # do something with the file
                    form.save()
                    csv_file = request.FILES['csv_file']

                    return render(request, 'password_change_done.html',)
            else:
                form = CSVUploadForm()
           return render(request, 'Paramétres.html', {'form': form})

Paramétres.html


             <form method="post" enctype="multipart/form-data">
    
                    {{ form.as_p }}
                    {% csrf_token %}

{#                 \<input type="submit" value="Upload"\>#}
\<button  class="btn btn-primary btnSendPP" type="submit" \>Envoyé\</button\>
\</form\>
Back to Top