title: Adding a custom DateTimeField that can be updated through a PUT request (DjangoRestFramework)
body: <p>I'm new to django and I created a django app by following this tutorial: <a href="http://www.django-rest-framework.org/tutorial/quickstart/" rel="nofollow">http://www.django-rest-framework.org/tutorial/quickstart/</a></p>
  
  <p>This tutorial gives a pre-made User class that includes various fields. I am trying to add a custom DateTimeField that can be updated frequently through a PUT request in android. How would I add this custom field "timestamp" to this class.</p>
  
  <p><strong>Here is my code:</strong></p>
  
  <blockquote>
    <p>Serializers.py</p>
  </blockquote>
  
  <pre><code>from django.contrib.auth.models import User
  from rest_framework import serializers
  from django.contrib.auth.models import models
  
  class UserSerializer(serializers.HyperlinkedModelSerializer):
      class Meta:
          model = User
          lookup_field = 'username'
          set_timezone = 'date_joined'
          fields = ('url', 'username','date_joined')
  </code></pre>
  
  <blockquote>
    <p>Views.py </p>
  </blockquote>
  
  <pre><code>from django.contrib.auth.models import User
  from rest_framework import viewsets
  from tutorial.quickstart.serializers import UserSerializer
  from django.conf import settings
  from django.shortcuts import redirect, render
  dir(settings)
  settings.__dict__
  
  
  
  class UserViewSet(viewsets.ModelViewSet):
      """
      API endpoint that allows users to be viewed or edited.
      """
      lookup_field = 'username'
      queryset = User.objects.all()
      serializer_class = UserSerializer
  </code></pre>
  
  <blockquote>
    <p>urls.py</p>
  </blockquote>
  
  <pre><code>from django.conf.urls import url, include
  from rest_framework import routers
  from tutorial.quickstart import views
  
  router = routers.DefaultRouter()
  router.register(r'users', views.UserViewSet)
  
  urlpatterns = [
      url(r'^', include(router.urls)),
      url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
  ]
  </code></pre>
  
  <blockquote>
    <p>Models.py</p>
  </blockquote>
  
  <pre><code>from django.db import models
  # Create your models here.
  from datetime import datetime
  
  class Time(models.Model):
     timestamp = models.DateTimeField(auto_now_add=True)
  
     def __unicode__(self):
         return "Time"
  </code></pre>
  
  <p><strong>ERROR</strong></p>
  
  <blockquote>
    <p>Exception Value:<br>
    Field name <code>timestamp</code> is not valid for model <code>User</code>.
    Exception Location: /Library/Python/2.7/site-packages/rest_framework/serializers.py in build_unknown_field, line 1079
    Python Executable:  /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
    Python Version: 2.7.6</p>
  </blockquote>