Django 2 - How to register a user using email confirmation and CBVs?
In addition to Peter's answer, if you are using Django 2 then the encoding and decoding parts are a bit differents.
Encoding :
Change 'uid': urlsafe_base64_encode(force_bytes(user.pk)),
To 'uid': urlsafe_base64_encode(force_bytes(user.pk)).decode(),
Decoding :
Change uid = force_text(urlsafe_base64_decode(uidb64))
To uid = urlsafe_base64_decode(uidb64).decode()
Django 3 Edit :
Encoding : uid = urlsafe_base64_encode(force_bytes(user.pk))
Decoding : uid = urlsafe_base64_decode(uidb64).decode()
This question specifically aims for a Django 2.0 answer as the registration module isn't available (yet) for it.
More, this might seem to broad, but I often found myself in situations where I can't use any 3rd party module because ... oh well..policies. I'm sure many did. And I know that looking and putting together information taken from here or django docs was a headache.

Workflow:
Let's suppose we need the following flow:

The user goes to the sign-up page and fills in the following fields: first_name, last_name and email (the email will be used as the username).
The user submits the form and receives a confirmation email with an URL containing a unique token.
When the user clicks on the received link, he's redirected to a page where he'll set his password. When done, he's logged in to the dashboard page.

Extra-info: The user will later log in by using his email (which is actually his username) and password.

Specific question:

How will the models/views (using CBVs)/forms/urls look like?