Timestamps in Django

I’ve recently been playing around with the Django web framework (all non-techies should stop reading this at once). ┬áHere’s a little snippet of code that’s useful if you want to add a timestamp to a model you’re creating: from datetime import datetime class My_Model(models.Model): date_created = models.DateTimeField() date_modified = models.DateTimeField() def save(self): if self.date_created ==… Continue reading Timestamps in Django