According to form you used in your template it will send only csv file
after clicking on submit button.

    <form enctype="multipart/form-data" method="post">
  {% csrf_token %}
<input type="file" id="file" name="file"/>
<tr><td><button type="submit" class="btn">Submit</button></td></tr>
  <form>

If you want to access Nome and Sobrenome in views on submit button, then
you need to pass these inputs in the same form you used for submit as

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

        <input type="text" name="Nome" placeholder="Nome" required>
        <input type="text" name="Sobrenome" placeholder="Sobrenome"
required>

<input type="file" id="file" name="file"/>
<tr><td><button type="submit" class="btn">Submit</button></td></tr>
  <form>

 Currently you are using two different forms for uploading file and Nome &
Sobrenome.

And why there are 2 functions with same name index in your views ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to