I have a model
class Anh_chi_tiet(models.Model):
du_an = models.ForeignKey(Du_an)
title = models.CharField(max_length=120)
url = models.ImageField(upload_to='images', height_field='50', width_field='100')
url_detail = models.ImageField(upload_to='images', height_field='200', width_field='400')
I always receive this error:
'Anh_chi_tiet' object has no attribute '100'
It seems Django require both the fields in the same table Anh_chi_tiet to save height_field and width_field.
How can I directly set these values without append new fields in my table?