title: Django UUIDField issue
body: <p>I am trying to get the UUIDField to work in python django using the following model:</p>
  
  <pre><code>class Ticket(models.Model):
      id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
      name = models.CharField(max_length=50)
  </code></pre>
  
  <p>However when I try adding an instance of the model to the database it returns the following error: 
  TypeError at /tickets/
  coercing to Unicode: need string or buffer, UUID found</p>
  
  <p>The documentation of UUIDField is really short and doesn't really help me.</p>
  
  <p>edit: I did import uuid and here is the full traceback:
  Environment:</p>
  
  <pre><code>Request Method: GET
  Request URL: http://127.0.0.1:8000/tickets/
  
  Django Version: 1.8.5
  Python Version: 2.7.9
  Installed Applications:
  ('django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'events',
   'rest_framework')
  Installed Middleware:
  ('django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware',
   'django.middleware.security.SecurityMiddleware')
  
  
  Traceback:
  File "/Users/daviddejong/.virtualenvs/restDemo/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
    132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/daviddejong/.virtualenvs/restDemo/lib/python2.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
    58.         return view_func(*args, **kwargs)
  File "/Users/daviddejong/.virtualenvs/restDemo/lib/python2.7/site-packages/rest_framework/viewsets.py" in view
    87.             return self.dispatch(request, *args, **kwargs)
  File "/Users/daviddejong/.virtualenvs/restDemo/lib/python2.7/site-packages/rest_framework/views.py" in dispatch
    466.             response = self.handle_exception(exc)
  File "/Users/daviddejong/.virtualenvs/restDemo/lib/python2.7/site-packages/rest_framework/views.py" in dispatch
    463.             response = handler(request, *args, **kwargs)
  File "/Users/daviddejong/.virtualenvs/restDemo/lib/python2.7/site-packages/rest_framework/mixins.py" in list
    48.         return Response(serializer.data)
  File "/Users/daviddejong/.virtualenvs/restDemo/lib/python2.7/site-packages/rest_framework/serializers.py" in data
    663.         ret = super(ListSerializer, self).data
  File "/Users/daviddejong/.virtualenvs/restDemo/lib/python2.7/site-packages/rest_framework/serializers.py" in data
    228.                 self._data = self.to_representation(self.instance)
  File "/Users/daviddejong/.virtualenvs/restDemo/lib/python2.7/site-packages/rest_framework/serializers.py" in to_representation
    603.             self.child.to_representation(item) for item in iterable
  File "/Users/daviddejong/.virtualenvs/restDemo/lib/python2.7/site-packages/rest_framework/serializers.py" in to_representation
    461.                 ret[field.field_name] = field.to_representation(attribute)
  File "/Users/daviddejong/.virtualenvs/restDemo/lib/python2.7/site-packages/rest_framework/relations.py" in to_representation
    356.         name = self.get_name(value)
  File "/Users/daviddejong/.virtualenvs/restDemo/lib/python2.7/site-packages/rest_framework/relations.py" in get_name
    276.         return six.text_type(obj)
  
  Exception Type: TypeError at /tickets/
  Exception Value: coercing to Unicode: need string or buffer, UUID found
  </code></pre>
  
  <p>Edit 2: My serializer looks like this:</p>
  
  <pre><code>class TicketSerializer(serializers.HyperlinkedModelSerializer):
      class Meta:
          model = Ticket
          fields = ('url', 'id', 'name')
  </code></pre>
  
  <p>Edit 3:</p>
  
  <p>I found the error. I made a mistake in my model. My unicode looked like this:</p>
  
  <pre><code>def __unicode__(self):
      return self.id
  </code></pre>
  
  <p>And of course this does not work. </p>