anfema_django_utils.db.functions.Epoch

class Epoch(*args, **kwargs)

Bases: django.db.models.Func

Postgres function to extract the epoch (i.e. seconds) from an interval.

Methods

Attributes

function

template

function = 'EXTRACT'
template = "%(function)s('epoch' from %(expressions)s)"