<filename>mysite/models.py
from django.db import models




class Book(models.Model):

    name = models.CharField(max_length=50)
    pages = models.CharField(max_length=50)
    
    
    def __str__(self):
        return self.name

<filename>mysite/models.py
from django.db import models




class Book(models.Model):

    name = models.CharField(max_length=50)
    pages = models.CharField(max_length=50)
    
    
    def __str__(self):
        return self.name
