I have a model which contains FileField
as below
class Employer(models.Model):
logo = models.FileField(storage=FileSystemStorage(location=settings.MEDIA_ROOT), upload_to='logos')
The question is how can I add a default file like "{{ MEDIA_ROOT}}/logos/anonymous.jpg" to this filefield ?
settings.MEDIA_ROOT
get interpolated to the proper value in the string? – Boisleduc