Django Version 1.9.6. Python Version: 3.4.3
I've made a binary field in my model (flal_file = models.BinaryField()
) for inserting binary data in the database.
Database column is blob field.
I get that error when creating an object (insert).
Commenting out flal_file
prevents this error.
I don't know why I get this error, since this is a binary field.
Is that a bug with older versions of Django? Can anyone help me debug this issue?
myfile = request.FILES['uploaded_file']
b = DocFileAllocation.objects.using('db_test_').create(
flal_file=myfile.read(), #binary data
flal_id_no=seq_doc_file,
bmeta_id_no=seq_metadata,
flal_file_subject=subject,
)
b.save(using='db_test_')