A model is a Python class that defines the structure of your data — each model maps to a database table, and each attribute to a column. The ORM (Object-Relational Mapper) lets you interact with the database using Python objects and methods instead of writing raw SQL.
Defining a model
django.db models
(models.Model):
title = models.CharField(max_length=)
body = models.TextField()
published = models.BooleanField(default=)
created_at = models.DateTimeField(auto_now_add=)
views = models.IntegerField(default=)
():
.title
