In my model I have :
class Alias(MyBaseModel):
remote_image = models.URLField(max_length=500, null=True, help_text=\"A URL that is downloaded and cached
While this doesn't actually answer your question, I'd go about this in a different way.
Simply clear the remote_image
field after successfully saving the local copy. Then in your save method you can always update the image whenever remote_image
isn't empty.
If you'd like to keep a reference to the url, you could use an non-editable boolean field to handle the caching flag rather than remote_image
field itself.