jamesmarlowe / django-AutoDateTimeFields

django date time fields that don't break like auto_now and auto_now_add do

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

django-AutoDateTimeFields

django date time fields that don't break like auto_now and auto_now_add do

Installation

install the python package with pip

pip install django-AutoDateTimeFields

or install manually

python setup.py install

add autodatetimefields to installed apps setting:

INSTALLED_APPS = (
    ...
    'autodatetimefields'
)

Usage

from autodatetimefields.models import AutoNewDateTimeField, AutoDateTimeField

class ModelName(models.Model):
    date_created = AutoNewDateTimeField(blank=True)
    date_updated = AutoDateTimeField(blank=True)

Contributors

James Marlowe https://github.com/jamesmarlowe

About

django date time fields that don't break like auto_now and auto_now_add do

License:MIT License


Languages

Language:Python 100.0%