I have a Photo model that I want to update. When I try to save I get errors from my s3 bucket as well as validation errors about certain fields cannot be null. I think I understand why it is doing this, it assumes this is a totally new image upload, but all I want to do is edit th开发者_StackOverflowe title. How can I accomplish this? Any help would be greatly appreciated.
Your file storage shouldn't be called unless the file associated with your FileField has changed. In your case, I don't see a reason why s3 should ever even get hit by doing a simple photo.title = 'New title'; photo.save()
It could be lots of other issues, granted, I haven't tried Imagekit yet (very nice app!), but I'm guessing something, somewhere is inadvertently altering your ImageField
file data. I suggest you write a simple test that edits an existing Photo model instance and debug the issue thoroughly.
精彩评论