from django.db import models
class Post(models.Model):
title = models.CharField(max_length=200)
content = models.TextField()
// ES6 Class syntax
class Person {
constructor(name, age) {
this.name = name;
this.age = age;
}
from django.db import models
from django.utils import timezone
class TimeStampedModel(models.Model):
"""Abstract base class with created/updated timestamps."""