title: Extending django User django-rest_framework gives me KeyError
body: <p>I'm new to django rest_framework and have and issue, i've extended the auth_user as per the django docs, but is giving me a hard time...</p>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>class UserProfile(models.Model):
      user = models.OneToOneField(User, primary_key=True, on_delete=models.CASCADE)
      national_id = models.CharField(max_length=10, blank=True, null=True)
      mobile = models.CharField(max_length=10)
      pin = models.IntegerField()
      pattern = models.IntegerField(blank=True, null=True)
      fingerprint = models.CharField(max_length=45, blank=True, null=True)
  
      class Meta:
          managed = False
          db_table = 'user_profile'
  </code></pre>
  
  <p><strong>serializers.py</strong></p>
  
  <pre><code>class UserSerializer(serializers.ModelSerializer):
      national_id = serializers.CharField(source='userprofile.national_id', allow_null=True, required=False)
      mobile = serializers.CharField(source='userprofile.mobile')
      pin = serializers.IntegerField(source='userprofile.pin', write_only=True)
      pattern = serializers.IntegerField(source='userprofile.pattern', write_only=True)
      fingerprint = serializers.CharField(source='userprofile.fingerprint', write_only=True, allow_null=True, required=False)
  
      class Meta:
          model = User
          fields = ('id', 'username', 'password', 'first_name', 'last_name', 'email', 'national_id', 'mobile', 'pin', 'pattern', 'fingerprint')
          write_only_fields = ('password',)
          read_only_fields = ('last_login', 'is_superuser', 'is_staff', 'is_active', 'date_joined')
  
      def create(self, validated_data):
          user = User(
              username=validated_data['username'],
              first_name=validated_data['first_name'],
              last_name=validated_data['last_name'],
              email=validated_data['email'],
              )
          user.set_password(validated_data['password'])
          user.save()
          userprofile = UserProfile(
              user=user,
              national_id=validated_data['national_id'],
              mobile=validated_data['mobile'],
              pin=validated_data['pin'],
              pattern=validated_data['pattern'],
              fingerprint=validated_data['fingerprint'],
              )
          userprofile.save()
          return user
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>class UserView(viewsets.ModelViewSet):
      serializer_class = UserSerializer
      queryset = get_user_model().objects
  </code></pre>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>from django.conf.urls import include, url
  from django.contrib import admin
  from rest_framework.routers import DefaultRouter
  
  from restful.views import *
  
  router = DefaultRouter()
  
  router.register(r'availability-notification', AvailabiltyNotificationView)
  router.register(r'bank', BankView)
  router.register(r'recipient', RecipientView)
  router.register(r'user', UserView)
  
  urlpatterns = [
      url(r'^', include(router.urls)),
      url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
      url(r'^admin/', admin.site.urls),
  </code></pre>
  
  <p>but keeps giving me:</p>
  
  <blockquote>
    <p>Environment:</p>
    
    <p>Request Method: POST Request URL: <a href="http://localhost:8000/user/" rel="nofollow">http://localhost:8000/user/</a></p>
    
    <p>Django Version: 1.10.2 Python Version: 3.5.2 Installed Applications:
    ['django.contrib.admin',  'django.contrib.auth', 
    'django.contrib.contenttypes',  'django.contrib.sessions', 
    'django.contrib.messages',  'django.contrib.staticfiles', 
    'rest_framework',  'restful'] Installed Middleware:
    ['django.middleware.security.SecurityMiddleware', 
    'django.contrib.sessions.middleware.SessionMiddleware', 
    'django.middleware.common.CommonMiddleware', 
    'django.middleware.csrf.CsrfViewMiddleware', 
    'django.contrib.auth.middleware.AuthenticationMiddleware', 
    'django.contrib.messages.middleware.MessageMiddleware', 
    'django.middleware.clickjacking.XFrameOptionsMiddleware']</p>
    
    <p>Traceback:</p>
    
    <p>File
    "C:\Users\echavez\Envs\YEiPii\lib\site-packages\django\core\handlers\exception.py"
    in inner
      39.             response = get_response(request)</p>
    
    <p>File
    "C:\Users\echavez\Envs\YEiPii\lib\site-packages\django\core\handlers\base.py"
    in _get_response
      187.                 response = self.process_exception_by_middleware(e, request)</p>
    
    <p>File
    "C:\Users\echavez\Envs\YEiPii\lib\site-packages\django\core\handlers\base.py"
    in _get_response
      185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)</p>
    
    <p>File
    "C:\Users\echavez\Envs\YEiPii\lib\site-packages\django\views\decorators\csrf.py"
    in wrapped_view
      58.         return view_func(*args, **kwargs)</p>
    
    <p>File
    "C:\Users\echavez\Envs\YEiPii\lib\site-packages\rest_framework\viewsets.py"
    in view
      87.             return self.dispatch(request, *args, **kwargs)</p>
    
    <p>File
    "C:\Users\echavez\Envs\YEiPii\lib\site-packages\rest_framework\views.py"
    in dispatch
      474.             response = self.handle_exception(exc)</p>
    
    <p>File
    "C:\Users\echavez\Envs\YEiPii\lib\site-packages\rest_framework\views.py"
    in handle_exception
      434.             self.raise_uncaught_exception(exc)</p>
    
    <p>File
    "C:\Users\echavez\Envs\YEiPii\lib\site-packages\rest_framework\views.py"
    in dispatch
      471.             response = handler(request, *args, **kwargs)</p>
    
    <p>File
    "C:\Users\echavez\Envs\YEiPii\lib\site-packages\rest_framework\mixins.py"
    in create
      21.         self.perform_create(serializer)</p>
    
    <p>File
    "C:\Users\echavez\Envs\YEiPii\lib\site-packages\rest_framework\mixins.py"
    in perform_create
      26.         serializer.save()</p>
    
    <p>File
    "C:\Users\echavez\Envs\YEiPii\lib\site-packages\rest_framework\serializers.py"
    in save
      192.             self.instance = self.create(validated_data)</p>
    
    <p>File "C:\Users\echavez\Source\ws\restful\serializers.py" in create
      45.             national_id=validated_data['national_id'],</p>
    
    <p>Exception Type: KeyError at /user/ Exception Value: 'national_id'</p>
  </blockquote>
  
  <p>I know this is a newbie question, but, i really need help!</p>
  
  <p>Thanks in advance.</p>