On Mar 26, 4:42 pm, Michael Strickland wrote:
> You should just be able to take out the MEDIA_ROOT portion of your
> upload_to path. So instead of:
> upload_to='%s/images/' % settings.MEDIA_ROOT
> You would have:
> upload_to='images/'
>
> That should make it store the relative address and
You should just be able to take out the MEDIA_ROOT portion of your
upload_to path. So instead of:
upload_to='%s/images/' % settings.MEDIA_ROOT
You would have:
upload_to='images/'
That should make it store the relative address and not the absolute
address in your database.
As for {{photo.
Hi,
Sorry if my question seems trivial, but I've looked around for an
answer and I'm really at loss...
I've got a simple model:
class Photo(models.Model):
image_file = models.ImageField(_('image file'), upload_to='%s/
images/' % settings.MEDIA_ROOT)
But when I upload an image via the admin
3 matches
Mail list logo