Python Django Mezzanine Models Import
Question: 
    from django.db import models
    from mezzanine.pages.models import Page
    
    # The members of Page will be inherited by the Author model, such
    # as title, slug, etc. For authors we can use the title field to
    # store the author's name. For our model definition, we just add
    # any extra fields that aren't part of the Page model, in this
    # case, date of birth.
    
    class Author(Page):
        dob = models.DateField("Date of birth")
    
    class Book(models.Model):
        author = models.ForeignKey("Author")
        cover = models.ImageField(upload_to="authors")
    

So does Book also inherits properties of Page? So it means any property or
method of Page is accessible from the above code?


Answer: It is better to user foreign key relationship if you want to extend a model.
You can use a one-to-one relationship to a model containing the fields for
additional information. For example:

    
    
    class Author(models.Model):
        page = models.OneToOneField(Page)
        dob = models.DateField("Date of birth")
    

you can access the related information using Django’s standard related model
conventions:

    
    
    a = Author.objects.get(...) 
    name = a.page.title # author's name is stored in Page.title field
    

