[Answered ]-Django user activation doesnt work with token — TypeError: a bytes-like object is required, not 'str'

1👍

probably you are need force_str
more here: https://docs.djangoproject.com/en/4.1/ref/utils/#django.utils.encoding.force_str

in your case:

user = User.objects.get(pk=uid.decode("utf-8"))

more here:
https://docs.python.org/3/library/stdtypes.html#bytes.decode

Leave a comment