Replying to myself, in case anyone else runs into this. The problem,
well, cause of frustration was in the way that get_FIELD_url()
constructs it's return call. It uses urlparse.urljoin to join MEDIA_URL
to the upload_to path. When MEDIA_URL does not end in a slash, urljoin
strips off the final
I'm using an ImageField in my model, and am having problems with the
get_FOO_url() functionality.
For example, with a model such as:
class MyModel(models.Model):
headshot = models.ImageField(upload_to='uploads/foo')
and the following in settings.py:
MEDIA_ROOT='/home/user/myproject/media'
2 matches
Mail list logo