33👍
It is not added to your model built-in in every table. You must add it as field to your model.
class Message(models.Model):
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
Message in this case your table’s name.
- How can I automatically let syncdb add a column (no full migration needed)
- Django QuerySet Custom Ordering by ID
Source:stackexchange.com