title: Better way to make usernames NOT case sensitive in Django?
body: <p>Django's default User model username validator allows <code>testUser</code> and <code>TestUser</code> for 2 different usernames.</p>
  
  <p>I found a way to make username case insensitive during the registration but I am wondering if there's not a built-in way to do that.</p>
  
  <p>Here is how I did it:</p>
  
  <pre class="lang-py prettyprint-override"><code>if form.is_valid():
      username = form.cleaned_data['username']
  
      brk = True
  
      try:
          User.objects.get(username__iexact=username)
      except:
          brk = False
  
      if brk:
          messages.warning(request, 'Username already in use')
          return redirect('signup')
  
      form.save()
  </code></pre>
  
  <p>This method looks a bit unprofessional. Isn't there a built-in way like there always is in Django? Something like an argument in the username <code>model</code> field.</p>