title: object-level permissions django
body: <p>How do you ensure that a User can only edit objects they've created? What's the best way to set this up?</p>
  
  <p>I'm using django-rest-framework and wondering if there's a way I can restrict users from viewing/ editing objects they don't 'own'. </p>
  
  <pre><code>class Video(models.Model):
      owner = models.ForeignKey(User)
      ...
  </code></pre>
  
  <p>So User 'x' should only be able to edit videos in their owner_set. </p>