title: Reference to another field in model.py // Django
body: <p>I would like to return in <strong>str</strong> method of the Chapter, title of the Chapter and title of the Book (from book model). I need it for better display at the admin pages. How to do that?</p>
  
  <p>Should I create some new method in Book or use Model instance reference <a href="https://docs.djangoproject.com/en/1.11/ref/models/instances/#model-instance-methods" rel="nofollow noreferrer">https://docs.djangoproject.com/en/1.11/ref/models/instances/#model-instance-methods</a> ?
  Or maybe I should use Retrieving specific objects with filters?
  <a href="https://docs.djangoproject.com/en/1.11/topics/db/queries/#retrieving-objects" rel="nofollow noreferrer">https://docs.djangoproject.com/en/1.11/topics/db/queries/#retrieving-objects</a></p>
  
  <p>I am new to the django, thank you in advance for the solutions.</p>
  
  <pre><code>class Book(models.Model):
      author = models.CharField(max_length=200)
      title = models.TextField()
      created_date = models.DateTimeField(
              default=timezone.now)
  
      def __str__(self):
          return self.title+" ("+self.author+")"
  
      def book_author(self):
          return self.author
  
  class Chapter(models.Model):
      book = models.ForeignKey(Book, on_delete=models.CASCADE)
      title = models.TextField()
      created_date = models.DateTimeField(
              default=timezone.now)
      body = models.TextField()
      hierarchy = models.IntegerField()
      sort = models.IntegerField(unique=True)
  
      def __str__(self):
          print(repr(Book))
          print(repr(Book.author))
  #       print(repr(Book.objects.all().filter(id==1)))
  #        print(repr(Book.objects.get(id=1)))
          print(repr(Book.book_author(self)))
          return self.title+"(book: "+")"
  </code></pre>