Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dex4er/django-seconds-field
Store a number of seconds in Django model
https://github.com/dex4er/django-seconds-field
Last synced: 29 days ago
JSON representation
Store a number of seconds in Django model
- Host: GitHub
- URL: https://github.com/dex4er/django-seconds-field
- Owner: dex4er
- License: lgpl-3.0
- Created: 2019-04-22T19:18:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-22T20:25:11.000Z (over 5 years ago)
- Last Synced: 2024-11-28T07:46:17.127Z (about 2 months ago)
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
README
.. image:: https://img.shields.io/pypi/v/django-seconds-field.svg
:target: https://pypi.python.org/pypi/django-seconds-field
.. image:: https://travis-ci.org/dex4er/django-seconds-field.svg?branch=master
:target: https://travis-ci.org/dex4er/django-seconds-field
.. image:: https://readthedocs.org/projects/django-seconds-field/badge/?version=latest
:target: http://django-seconds-field.readthedocs.org/en/latest/
.. image:: https://img.shields.io/pypi/pyversions/django-seconds-field.svg
:target: https://www.python.org/
.. image:: https://img.shields.io/pypi/djversions/django-seconds-field.svg
:target: https://www.djangoproject.com/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``:
.. code:: python
pip install django-seconds-field
Usage
-----**models.py**
.. code:: python
from django.db import models
from django_seconds_field import SecondsFieldclass 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).