Issue
I have a jinja2 template that contains hrefs
<td><a href="{{entry.Url}}">Product URL</a></td>
However, when I run the application and click the link on the page I get the development server in front of the correct url. So it would look like the following in the browser:
http://121.1.2.1:8764/www.google.com/
When I just want the following link:
www.google.com
Any ideas on how I can get this to work?
Thanks!
Solution
This worked for me while testing.
<a href="{{ ''.join(['http://', entry.Url]) }}">{{ entry.Url }}</a>
# entry.Url == www.google.com
# <a href="http://www.google.com">www.google.com</a>
Answered By - bnlucas
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.