Skip to main content

Store a number of seconds in Django model

Project description

https://img.shields.io/pypi/v/django-seconds-field.svg https://travis-ci.org/dex4er/django-seconds-field.svg?branch=master https://readthedocs.org/projects/django-seconds-field/badge/?version=latest https://img.shields.io/pypi/pyversions/django-seconds-field.svg https://img.shields.io/pypi/djversions/django-seconds-field.svg

django-seconds-field

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.

Installation

Install with pip or pipenv:

pip install django-seconds-field

Usage

models.py

from django.db import models
from django_seconds_field import SecondsField

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

License

Copyright © 2019, Piotr Roszatycki

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

Project details


Download files

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

Files for django-seconds-field, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size django_seconds_field-0.1.0-py2.py3-none-any.whl (5.4 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size django-seconds-field-0.1.0.tar.gz (16.8 kB) File type Source Python version None Upload date Hashes View

Supported by

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