Defining a model involves creating a Python class that inherits from django.db.models.Model
.
Example:
from django.db import models
class Blog(models.Model):
name = models.CharField(max_length=100)
tagline = models.TextField()
def __str__(self):
return self.name