NoReverseMatch with keyword argument uidb64 with Django 2.0
In Django 2.0 and 2.1 you should call decode() after base64 encoding the uid, to convert it to a string: message = render_to_string(‘acc_active_email.html’, { ‘user’: user, ‘domain’: current_site.domain, ‘uid’: urlsafe_base64_encode(force_bytes(user.pk)).decode(), ‘token’: account_activation_token.make_token(user), }) See the note in the Django 2.0 release notes for more info. In Django 2.2+, urlsafe_base64_encode returns a string, so there is … Read more