I wouldn't recommend attempting to log users in via a url. The url is unencrypted (unless you're using HTTPS and even that can still be scraped) and easy to intercept or just guess with brute force.
There are two possible solutions I can think of:
Use Django Sessions and Cookies
Take advantage of the fact that in Django the login automatically saves a cookie. Once a user is logged in, they stay logged in until they log out (or the cookie expires, but this can be set to live forever). Then, all you need to do is create a /myprofile/ url of some sort and just send the users there. If the user is logged in, this is where you show their user profile.
Encode with a Hash
However, if you really want to actually pass a url with a username and password, I'd recommend obfuscating their username and password as an MD5 hash, which you can then pass via the url.
import urllib, hexlib
username = 'joeblow'
password = 'password'
url = 'http://www.mysite.com/users/login/'
url += urllib.urlencode({
'username':hashlib.md5(username.lower()).hexdigest(),
'password':hashlib.md5(password.lower()).hexdigest(),
})
# return the url to the user in the email template
return url
Note: I would still highly recommend option 1!