How can I send data via copy paste operation in Django Views or model?
I have such a very difficult problem. Which is very specific and not easy to enter data.
I am thinking how to send data to the database or, as an option, just send data to the code in the internal Django code for processing in Views.
Is it possible, for example, to have the ability to send data not one by one in the singular, to fill in the input field.
Fill in the input field not only one in the singular. For example, as the most common case of data processing in office or other applications - the copy / paste operation.
So in this frequent popular operation - for example, we want to copy several elements in an Excel table and try to insert them somehow send to the code in the internal Django code for processing in Views.
Is it possible to implement something similar?
So as not to manually enter data, but somehow have the ability to do this in a semi-automatic form - by copying several cells with data and pasting them into some kind of form or something similar?
How can I send data via copy paste operation in Django Views or model?
from django import forms
class InputForm(forms.Form):
first_name = forms.CharField(max_length = 200)
last_name = forms.CharField(max_length = 200)
roll_number = forms.IntegerField(
help_text = "Enter 6 digit roll number"
)
password = forms.CharField(widget = forms.PasswordInput())
from django.shortcuts import render
from .forms import InputForm
# Create your views here.
def home_view(request):
context ={}
context['form']= InputForm()
return render(request, "home.html", context)
<form action = "" method = "post">
{% csrf_token %}
<table>
{{ form.as_table }}
</table>
<input type="submit" value="Submit">
</form>