Skip to content

Django model field to store relativedelta from python-dateutil

License

Notifications You must be signed in to change notification settings

anfema/django-relativedeltastore

Repository files navigation

django-relativedeltastore

A Django model field to store dateutil.relativedelta.relativedelta.

The field is a subclass of JSONField and simply stores the kwargs of a relativedelta instance.

The field is mainly meant to store relativedelta. The package django-relativedelta provides better query support (for relative units since it uses a sql INTERVAL).

The basic arguments for relative and absolute units are supported (year, yearsmicroseconds). Currently not supported are: weekday, leapdays, yearday & nlyearday

The package also provides a form field to edit the value of RelativeDeltaStoreField with a custom serialization format (configurable): 1hour +1days -1seconds

About

Django model field to store relativedelta from python-dateutil

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages