title: How to get user id from JWT
body: <p>How to get user id from JWT token.
  My JWT token has payload something like this:</p>
  
  <pre><code>{
    "username": "Steve",
    "is_admin": false,
    "id": 1
  }
  </code></pre>
  
  <p>How do I get access to <code>user id</code>?
  I actually want to update certain fields in database as per the id, that are for a specific user.</p>
  
  <p>Secondly after gaining the access how do I get update the fields?</p>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>class Profile(models.Model):
      branch = models.CharField(max_length=20, null=True)
      year = models.IntegerField(null=True)
      image = models.ImageField(upload_to="accounts/images/", null=True, blank=True)
  </code></pre>
  
  <p><strong>serializer.py</strong></p>
  
  <pre><code>class ProfileSerializer(serializers.ModelSerializer):
      class Meta:
          model = Profile
          fields = ('branch', 'year' ,'image',)
  </code></pre>
  
  <p>What will be the view to update these fields?</p>