title: Django: SendGrid Click Tracking service prevents messages framework from working
body: <p>I'm trying to implement signup with confirmation email with Django using SendGrid as email provider, my 'SignUpActivationView' code validates the token and then redirects the user to the home page, where a success/error message is displayed using the messages framework:</p>
  
  <pre><code>class SignUpActivationView(RedirectView):
      redirect_url = reverse_lazy('link_list')
  
      def dispatch(self, request, *args, **kwargs):
          ...
          # if token is valid:
          messages.error(self.request, 'Your account is now active.')
          return HttpResponseRedirect(self.redirect_url)
          # if token is invalid:
          messages.error(self.request, 'Your account could not be activated.')
          return HttpResponseRedirect(self.redirect_url)
  </code></pre>
  
  <p>So far my approach works as long as I copy-paste the link in my browser, if I click on it instead, the user is activated but <strong>the success message is not shown</strong> in my application. I believe this is because SendGrid's Click Tracking service is wrapping my link:</p>
  
  <p><a href="https://i.stack.imgur.com/9eEUV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9eEUV.png" alt="SendGrid Click Tracking Service"></a></p>
  
  <p>A workaround I found is to tell SendGrid to NOT track the link by adding and the 'clicktracking=off' HTML attribute, the disadvantage is that I can only tell SendGrid not to track links in the HTML version of my email. In case the user's email client decides to open the Plain text version of the email, then link will still be wrapped.</p>
  
  <pre><code> # solution: do not track clicks
   # caveat: only works in HTML, not in plain text emails
   &lt;a clicktracking=off href="http://foo.bar"&gt;Confirmation link&lt;/a&gt;
  </code></pre>
  
  <p>So Link Tracking is pretty month mandatory for Plain text emails. </p>
  
  <p>Is there any way to make the messages framework work with Link Tracking?</p>