I am trying to save multiple select dropdown data into my database and i am using select2 class for the same, but in my backend the data save in format like ['\tdataname1\t', '\tdataname2\t']. i want to fix it and save data as 'dataname1', 'dataname2',
for data in data:
print(data)
Model(fieldname=data)
This is the dropdown data multiselect image...(how i am selecting data) click here [1]
i tried this way but first value of selected data will store into database, here is the image of single valu saved through forloop, and multiple value saved with back slash.
This image contains two columns and two types of data saved, one is without back slash but only single value of multiselect dropdown, and another one is of multiple data save with back slash
click here [2]
for m in materials:
instance = Inquiry(materials=m)
for t in technologies:
instance = Inquiry(technologies=t)
for c in certifications:
instance = Inquiry(certifications_req=c)
instance.save()```
[1]: https://i.stack.imgur.com/Nke0b.png
[2]: https://i.stack.imgur.com/9KM06.png