title: how to register a user with a specific email address Django?
body: <p>How do I register a user with a specific email address?</p>
  <pre><code>def register(request):
  if request.method == &quot;POST&quot;:
      username = request.POST[&quot;username&quot;]
      email = request.POST[&quot;mail&quot;]
  
      # Ensure password matches confirmation
      password = request.POST[&quot;password&quot;]
      confirmation = request.POST[&quot;confirmation&quot;]
      if password != confirmation:
          return render(request, &quot;auctions/register.html&quot;, {
              &quot;message&quot;: &quot;Passwords must match.&quot;
          })
  </code></pre>