0

I am trying to build an email verification portion of my application. So the user enters their email, hits submit, and they will get an email with a one-time "token" or link that allows them to access the actual sign up page. How do I go about this with the newer version of django since the

from django.contrib.auth.tokens import PasswordResetTokenGenerator

from django.utils import six

code doesn't seem to be working?

The actual error says cannot import name six from django.utils. I see in other answers Getting error cannot import name 'six' from 'django.utils' when using Django 3.0.0 latest version that it has to do with six being dropped from django 3.0. Is there a better way to do verification emails upon registration?

Fiboniz
  • 37
  • 6

1 Answers1

0

Install six: pip install six

or if it is already installed

change this: 'from django.utils import six' for this: import six

https://docs.djangoproject.com/en/3.0/releases/3.0/ Since we expect apps to drop Python 2 compatibility when adding support for Django 3.0, we’re removing these APIs at this time. django.utils.six - Remove usage of this vendored library or switch to six.