I have a legacy MySQL database. I decided to generate models from the database tables using 'inspectdb'. I have some images stored as mediumblob fields in a table.
I see that Django generated those field as following:
origimage = models.TextField(db_column='OrigImage') # Field name made lowercase.
Django documentaions says
If inspectdb cannot map a column’s type to a model field type, it’ll use TextField and will insert the Python comment 'This field type is a guess.' next to the field in the generated model.
I do not see the 'This field type is a guess'. Does not appear like Django treated this as a guess. Does Django translate mediumblob to TextField? I would need to see this as a file upload field in the Forms. Am I to change this to an ImageField for the field to be rendered correctly?
Additionally, what would be the right dhango data type to store images in database columns?
Thanks