title: Fail to POST OneToOneField with Django REST
body: <p>I am a beginner with Django and specially with the Django REST framework. 
  I'm trying to POST a new user which contains user's settings. </p>
  
  <p>This is my models.py</p>
  
  <pre><code>from django.db import models
  from datetime import datetime 
  from pygments.lexers import get_all_lexers
  from pygments.styles import get_all_styles
  
  LEXERS = [item for item in get_all_lexers() if item[1]]
  LANGUAGE_CHOICES = sorted([(item[1][0], item[0]) for item in LEXERS])
  STYLE_CHOICES = sorted((item, item) for item in get_all_styles())
  
  class Address(models.Model):
      number = models.IntegerField(null=True)
      streetName = models.CharField(max_length=50, default=None, null=True)
      zipCode = models.IntegerField(default=None, null=True)
      city = models.CharField(max_length=50, default=None, null=True)
      country = models.CharField(max_length=50, default=None, null=True)
  
  class Settings(models.Model):
      cancelTime = models.IntegerField(default=5)
      onlyInWifi = models.BooleanField(default=False)
  
  class User(models.Model):
      firstName = models.CharField(max_length=100)
      lastName = models.CharField(max_length=100)
      pseudo =  models.CharField(max_length=100, default=None)
      mail = models.CharField(max_length=100)
      password = models.CharField(max_length=250)
      address = models.ForeignKey(Address, null=True)
      settings = models.OneToOneField(Settings, null=True)
  </code></pre>
  
  <p>This is my serializers.py</p>
  
  <pre><code>from rest_framework import serializers
  from api.models import User
  from api.models import Address
  from api.models import Settings
  
  
  class AddressSerializer(serializers.ModelSerializer):
      class Meta:
          model = Address
          fields = ('number', 'streetName', 'zipCode', 'city', 'country')
  
  class SettingsSerializer(serializers.ModelSerializer):
      class Meta:
          model = Settings
          fields = ('cancelTime', 'onlyInWifi')
  
  class UserSerializer(serializers.ModelSerializer):
      address = AddressSerializer(required=False)
      settings = SettingsSerializer(required=False)
  
      class Meta:
          model = User
          fields = ('pk','firstName', 'lastName', 'pseudo', 'mail', 'password', 'settings', 'address')
  
      def create(self, validated_data):
          if(validated_data.get('address')):
              address_data = validated_data.pop('address')
              address = Address.objects.create(**address_data)
          else:
              address = None
  
          if(validated_data.get('settings')):
              settings_data = validated_data.pop('settings')
              settings = Settings.objects.create(**settings_data)
          else:
              settings = Settings()
  
          user = User.objects.create(**validated_data)  
          user.address = address
          user.settings = settings
          return user
  </code></pre>
  
  <p>This is my urls.py</p>
  
  <pre><code>from django.conf.urls import patterns, url
  
  urlpatterns = patterns(
      'api.views',
  
      #Users
      url(r'^users/$', 'users_list', name='users_list'),
      url(r'^users/(?P&lt;pk&gt;[0-9]+)$', 'user_detail', name='user_detail'),
  }
  </code></pre>
  
  <p>And this is my views.py</p>
  
  <pre><code>import logging
  
  from rest_framework import status
  from rest_framework.decorators import api_view
  from rest_framework.response import Response
  
  from api.models import User
  from api.serializers import UserSerializer
  
  #Users
  @api_view(['GET', 'POST'])
  def users_list(request):
      """
      List all users, or create a new user.
      """
      if request.method == 'GET':
          users = User.objects.all()
          serializer = UserSerializer(users, many=True)
          return Response(serializer.data)
  
      elif request.method == 'POST':
          serializer = UserSerializer(data=request.DATA)
          if serializer.is_valid():
              serializer.save()
              return Response(serializer.data, status=status.HTTP_201_CREATED)
          else:
              return Response(
                  serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  
  
  @api_view(['GET', 'PUT', 'DELETE'])
  def user_detail(request, pk):
      """
      Get, udpate, or delete a specific user
      """
      try:
          user = User.objects.get(pk=pk)
      except User.DoesNotExist:
          return Response(status=status.HTTP_404_NOT_FOUND)
  
      if request.method == 'GET':
          serializer = UserSerializer(user)
          return Response(serializer.data)
  
      elif request.method == 'PUT':
          serializer = UserSerializer(user, data=request.DATA, partial=True)
          if serializer.is_valid():
              serializer.save()
              return Response(serializer.data)
          else:
              return Response(
                  serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  
      elif request.method == 'DELETE':
          user.delete()
          return Response(status=status.HTTP_204_NO_CONTENT)
  </code></pre>
  
  <p>When I'm try to post a new user, I have the behavior that I want</p>
  
  <p>But when I load api/users to check if my user was well added, my settings field is null</p>
  
  <p>I don't understand what is the problem </p>