I don't know how to correctly set default path to none-media image.
I've tried to add /
, but it doesn't help:
...
image = models.ImageField(...
default='/static/course_lesson/resources/images/default.jpg')
...
And in HTML
page image.url
looked as follows:
...
src="/media/static/course_lesson/resources/images/default.jpg"
...
Try adding this to your model
def image_url (self):
if self.image: return self.image.url
else: return static("course_lesson/resources/images/default.jpg")
Then within template
src="{{ object.image_url }}"