title: Django using has_change_permission to determine owner
body: <p>I want to restrict other user to change object instance other then owner user.</p>
  
  <p>For that I am using <code>has_change_permission</code> admin model function but It is not working.</p>
  
  <p>My model:</p>
  
  <pre><code>class Book(models.Model):
      author = models.ForeignKey(User, related_name = 'book_author')
      ...
  </code></pre>
  
  <p>In my admin.py</p>
  
  <pre><code>class BookAdmin(admin.ModelAdmin):
      def has_change_permission(self, request, obj):
          if request.user.is_super_user():
              return True
          elif request.user == obj.author:
              return True
          else:
              return False
          if obj is None:
              return False
  </code></pre>
  
  <p>In my views.py </p>
  
  <pre><code>class BookUpdate(generic.UpdateView):
      model = Book
      form_class = BookUpdateForm
      template_name = 'accounts/book_update.html'
      def get_object(self, *args, **kwargs):
          return Book.objects.get(id=self.kwargs.get('id'))
  </code></pre>
  
  <p>In my urls:</p>
  
  <pre><code>url(r'^update_book/(?P&lt;id&gt;[\w-]+)/$', views.BookUpdate.as_view(),name='update_book')
  </code></pre>
  
  <p>Now when any one goes to this url pattern can edit book, but I need that only author can edit this book.</p>
  
  <p>Is <code>has_change_permission</code> right way to do so, or any other better way ?</p>