Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Store a number of seconds in Django model

Project description


django-seconds-field provides additional SecondsField type for Django model which stores datetime.timedelta object as a number of seconds in a database’s INTEGER type.


Install with pip or pipenv:

pip install django-seconds-field


from django.db import models
from django_seconds_field import SecondsField

class FooBar(models.Model):
    ttl = SecondsField()


Copyright © 2019, Piotr Roszatycki

This software is distributed under the GNU Lesser General Public License (LGPL 3 or greater).

Project details

Release history Release notifications

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
django_seconds_field-0.1.0-py2.py3-none-any.whl (5.4 kB) Copy SHA256 hash SHA256 Wheel py2.py3
django-seconds-field-0.1.0.tar.gz (16.8 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page