This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Show human readable created/modified dates and/or times in the django.contrib.admin changelist for models that track the moment of creation and updates.

Usage

First you will need to have a model that tracks the moment of creation and modification. The barebones example for that is:

from django.db import models

class TimestampedItem(models.Model):
    created = models.DateTimeField('created', auto_now_add=True)
    modified = models.DateTimeField('modified', auto_now=True)

Or, if you are using django-extensions:

from django_extensions.db.models import TimeStampedModel

class TimestampedItem(TimeStampedModel):
    pass

Now it’s time to register this model with Django’s admin site.

Create a admin class, just like you’d usually do, but make it extend TimestampedAdminMixin as well as any other base admin class you use:

from django.contrib import admin
from models import TimestampedItem
from admintimestamps import TimestampedAdminMixin

class TimestampedAdmin(TimestampedAdminMixin, admin.ModelAdmin):
    pass

admin.site.register(TimestampedItem, TimestampedAdmin)

That’s it!

Configuration

If the names of you timestamp fields aren’t created and modified but for example created_at and modified_at you’ll need to do a tiny bit of configuration in the model admin class:

class TimestampedAdmin(TimestampedAdminMixin, admin.ModelAdmin):
    timestamp_fields = ('created_at', 'modified_at')

You can also use the timestamp_fields tuple to only show one field by only specifying the field you want to show:

class TimestampedAdmin(TimestampedAdminMixin, admin.ModelAdmin):
    timestamp_fields = ('modified',)

Changelog for django-admin-timestamps

1.2 (2014-09-29)

  • Dropped support for Python < 2.6
  • Dropped support for Django < 1.4
  • Verified support for up to Django 1.7
  • Added support for Python 3

1.1.1 (2013-07-01)

  • Handle None values properly

1.1 (2012-02-21)

  • Just displaying one timestamp field is now possible.
  • Proper handling of date fields.

1.0.1 (2011-10-11)

  • Fixed setup.py to include the compat subpackage

1.0.0 (2011-10-07)

  • Initial release
Release History

Release History

1.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-admin-timestamps-1.2.zip (16.8 kB) Copy SHA256 Checksum SHA256 Source Sep 29, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting