I have created a Django template which serves as an email template for my app. Upon certain actions, a celery task sends an email from this template using Sendgrid. Previously I hard-coded the URLs but now I need them to be dynamic. I am passing the url string as a variable called profile_url. I know that the URL is formatted correctly because I am printing it before calling the send_mail() function. If I use the value like so it works:
<p>{{ profile_url }}</p>
However, when I use it as an href value the link renders unclickable:
<a
href="{{ profile_url }}"
target="_blank"
style="
text-decoration: none;
color: #ffffff;
line-height: 40px;
display: block;
"
>Go to your profile</a>
If anyone can assist me or at least point me in the right direction here I'd greatly appreciate it!