2👍
✅
Assuming your model looks something like this:
models.py
class MyModel(models.Model):
fileData = models.TextField()
views.py
def handle_uploaded_file(file, filename):
for s in file.read().split(','):
myobject = MyModel(fileData=s)
myobject.save()
Source:stackexchange.com