title: Requiring first_name and last_name in Django User model
body: <p>In <code>django.contrib.auth.models.User</code>, both <code>first_name</code> and <code>last_name</code> fields have <code>blank=True</code>. How can I make them <code>blank=False, null=False</code> in my own model?</p>
  
  <p>Here is my implementation, which basically follows the instructions of <a href="https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-the-existing-user-model" rel="nofollow noreferrer">Extending the existing User model</a>:</p>
  
  <blockquote>
    <p>models.py</p>
  </blockquote>
  
  <pre><code>class Fellow(models.Model):
  
      user = models.OneToOneField(
          User,
          on_delete=models.CASCADE
      )
  
      first_name = models.CharField(
          _("first_name"),
          max_length=30,
      )
      last_name = models.CharField(
          _("last_name"),
          max_length=30,
      )
  
      # other fields omitted
  
  from . import signals
  </code></pre>
  
  <blockquote>
    <p>signals.py</p>
  </blockquote>
  
  <pre><code>from django.contrib.auth.models import User
  from django.db.models.signals import post_save
  from django.dispatch import receiver
  
  from .models import Fellow
  
  
  @receiver(post_save, sender=User)
  def create_fellow_on_user_create(sender, instance, created, **kwargs):
      if created:
          Fellow.objects.create(user=instance)
  </code></pre>
  
  <p>However, I got an error when testing in <code>python manage.py shell</code>:</p>
  
  <pre><code>&gt;&gt;&gt; f = Fellow.objects.create(username='username', password='passwd')
  Traceback (most recent call last):
    File "&lt;console&gt;", line 1, in &lt;module&gt;
    File "/Users/sunqingyao/Envs/django_tutorial/lib/python3.6/site-packages/django/db/models/manager.py", line 85, in manager_method
      return getattr(self.get_queryset(), name)(*args, **kwargs)
    File "/Users/sunqingyao/Envs/django_tutorial/lib/python3.6/site-packages/django/db/models/query.py", line 392, in create
      obj = self.model(**kwargs)
    File "/Users/sunqingyao/Envs/django_tutorial/lib/python3.6/site-packages/django/db/models/base.py", line 571, in __init__
      raise TypeError("'%s' is an invalid keyword argument for this function" % list(kwargs)[0])
  TypeError: 'username' is an invalid keyword argument for this function
  </code></pre>