title: How to deal with model changes in Django Rest Framework?
body: <p>This is not a question for a particular use case, but for something I noticed in my experience doing APIs, specifically with using Django and Django Rest Framework.</p>
  
  <p>Months ago I had a problem with the API I maintain for a client's project.</p>
  
  <p>Let's say we have the following model:</p>
  
  <pre><code>class Person:
      first_name = models.CharField(max_length=100)
      last_name = models.CharField(max_length=100)
  </code></pre>
  
  <p>Then, the corresponding serializer:</p>
  
  <pre><code>class PersonSerializer(serializers.ModelSerializer):
      class Meta:
          model = Person
          fields = '__all__'
  </code></pre>
  
  <p>Of course, its corresponding ViewSet and route pointing to it: </p>
  
  <pre><code>http://localhost:8000/api/v1/persons/
  </code></pre>
  
  <p>Note this is the 1st version of my API.</p>
  
  <p>Everything OK at this point, right?</p>
  
  <p>Now, my client asked that we need to receive person's fullname instead of first and last name separately...</p>
  
  <p>As supposed, I'll have to change my model to be:</p>
  
  <pre><code>class Person:
      full_name = models.CharField(max_length=200)
  </code></pre>
  
  <p>There are 3 different clients (mobile apps) using this version of the API. Obviously I don't want to change my API, instead I will want to put the new approach in a new version.</p>
  
  <p>BUT the 1st version's Serializer is coupled with the Model, so at this point the 1st version of the API <strong>already changed</strong></p>
  
  <p>What I expect to read in answers below is how you guys deal with this problem in Django and what is the way I should take for my next projects using the same stack.</p>
  
  <p>Edit: My question's objetive is to understand if is better to decouple API from Models. I've put a very very basic example, but there are cases where things get much more complicated. For example I needed to modify a M2M relation to use the through option in order to add more fields to the intermediate table.</p>