I have a few problems with the django template with mimetype = "text / plain".
Firstly, the s3 url part is rendering with: 80 at the end, and then the actual image URL is rendering with "% 2f" in the replacement of each slash.
object.image.url
I tried safe and other custom tags to replace "% 2f" and it just doesn't work
#what I have http:
The user tag I tried next is safe:
import re from django import template register = template.Library() def reslash (value): return value.replace('%2f', '/') register.filter('reslash', reslash)
used as follows:
{{ object.image.url|reslash }}
But that will not work. Thanks
source share