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()

Documentation

See http://django-seconds-field.readthedocs.org/

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.

Source Distribution

django-seconds-field-0.1.0.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

django_seconds_field-0.1.0-py2.py3-none-any.whl (5.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-seconds-field-0.1.0.tar.gz.

File metadata

  • Download URL: django-seconds-field-0.1.0.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.3

File hashes

Hashes for django-seconds-field-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ce81a3e50dccb1b83954b18cb822db64cfc58d05a8fcd4080151ab2305b87125
MD5 234c0a8ca246c45cbf51e870f549b958
BLAKE2b-256 ecb252f6365854a6ccc6321c1f27e696feb0bb6b1db6eea504dbd94ee07eb93b

See more details on using hashes here.

File details

Details for the file django_seconds_field-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: django_seconds_field-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.3

File hashes

Hashes for django_seconds_field-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d1252a3356fa284b5977aff64cb0247f3d54324a62a4bba46f47f078bd3fd7b4
MD5 85eb31399ee813870aa30167c7ff2ba3
BLAKE2b-256 5dee1add923b84c6dde4166c570f0d0d5c98aaae49350c518a12eb74235a9315

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page