Skip to main content

A simple Django model mixin for timestampable models

Project description

Django Timestampable model is a simple enhancement mixin that enables Django models to have a created_at and updated_at field that is always updated.

This has been done under many plugins BUT the main difference between this plugin and the many others out there that do the same, is that Django Timestampable Models update the updated_at field under any circumstance: fixture loading, bulk updates, etc. whereas traditional Timestampable mixins only provide shorthand for auto_add and auto_add_now shortcuts for DateTimeField s.

It achieves this by using Django signals.

Quick start

  1. Add “django_timestampable” to your INSTALLED_APPS settings like this:
  1. Add TimestampableModel in your Model s like so:
class Stuff(TimestampableModel):

    some_attribute = CharField()


3. Run python makemigrations then python migrate to add the columns to your models in your database.


No dependencies.

Tested on Django 1.9.9, 1.10.1 with Python 2.7, 3.4, 3.5

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-timestampable-model-0.1.4.tar.gz (4.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page