Reputation: 364
I am developing an app which relies heavily on live user image creation upload. Since Heroku does not support live uploading (New files are flushed regularly), I am moving all images to Cloudinary.
For models with image fields, I have added this field:
c_image = CloudinaryField('image')
All imports work, and I made sure to add the south introspection rule:
add_introspection_rules([], ["^cloudinary\.models\.CloudinaryField"])
When I try to migrate, I get the error saying that this field is NOT NULL
yet no default is specified.
How do I set a default value or alternatively allow for null=true, blank=true
?
Upvotes: 0
Views: 472
Reputation: 15516
CloudinaryField
is a wrapper over top of a CharField
- you can just add null=True, blank=True
to the field definition.
Upvotes: 2