Using optional CloudinaryField in Django
I have a model that has a CloudinaryField, which I want to be optional:
featured_image = CloudinaryField('image', blank=True, null=True)
I can create an instance without adding a photo, as I wish. But if I want to remove one from an object that already has one, and save the change it is not possible.
What am I missing?
The error I get is "expected string or buffer"
I would really appreciate any help on this. Let me know if you need more info.
-
We'll be happy if you could please share some more information about this issue.
Specifically:
- What is the full error message?
- What is the stack trace?
- Which versions of python and Django are you using?
- Can you share some more specific reproduction steps?
If you'd prefer, please feel free to open a support ticket and we'll handle that directly and privately.
0 -
I use Django 1.10 and Python 3.5 but I tried also with Python 2.7.
I will first explain some reproduction steps in detail:
- Use a CloudinaryField('image', blank=True, null=True) options for a model of yours.
- Upload a photo for this field, for an instance of your model.
- Try to clear the field, and save the instance without a photo for your CloudinaryField.
The full error message in this case is here (link to avoid long post)
0
Post is closed for comments.
Comments
2 comments