Closed pmarcely closed 9 years ago
:+1: Same here.
I just realized that our docs are a bit misleading, as the ImageRatioField
is a essentially a CharField
and shouldn't be set to null
. Same goes for the ImageField
. (See this for example)
So we are going to fix that.
In Django 1.7 it is currently however necessary to set a default value for blankable fields. There is already a fix for that on master.
I see that we issue a new release in the next days.
Thanks, looking forward to test it.
Peter
@pmarcely Can you confirm that the issue is resolved when you use the latest (0.9.1) release?
@anrie It works well, thanks.
Hi guys,
I am using django 1.7. and its migrations. I did following steps: 1) Added 2 fields into my existing model company_logo = models.ImageField(null=True, blank=True, upload_to='logos') company_small_logo = ImageRatioField('company_logo', '150x150') 2) Ran makemigrations and it asked me to enter default value for company_small_logo. 3) After I ran migrate command it showed following error: django.db.utils.IntegrityError: table__new.company_small_logo may not be NULL
Actually, I managed to add ImageRatioField into new Model with zero rows, but all my attempts to extend the table with ImageRatioField failed. Adding 'null':True into field_kwargs in ImageRatioField.init method helped to solve the issue. Can you check this issue? Did I miss something that I had experienced integrityerror?
Thank you, Peter