I always do something like this:

    abs_activate_url =
request.build_absolute_uri(reverse('account_activate', args=user.id))

That's an absolute URL, so it's like "http://domain.com/account/
activate/2" instead of the normal reverse() or {% url %} which gives a
relative URL like "/account/activate/2".  Then you can use it just
like others have stated:

    from django.template.loader import render_to_string
    email_body = render_to_string('email_template.html', {
        'abs_activate_url': abs_activate_url,
    }

Jason Mayfield's "current site" method seems easier, since you don't
have to make & pass all the absolute URLs first.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to