Confirmation of registration via e-mail?

There is a system check, everything works well, you need to confirm registration through a random link emailed to the new user.
Is there any tips or examples on how to accomplish this task?
one idea is to generate random characters in URLs to make a link to it from the regular season, then in the view process, type of request take out a random url to compare it with the URLs of all the users, there is a coincidence ? - is_active: true.
June 8th 19 at 17:00
1 answer
June 8th 19 at 17:02
def get_random_string(length=12,

Save the hash in the user's session and check
Or store in a DB and check at the same time , the hash and user
Only in session a bad idea, many than one browser and mail can open another to confirm that can cause misunderstanding. In the database be sure to save. - robb42 commented on June 8th 19 at 17:05

Find more questions by tags PythonDjango