Пример #1
0
def timeuntil(value, *args):
    if value is None or isinstance(value, Undefined):
        return u""
    from django.utils.timesince import timeuntil

    value = template_localtime(value)
    return timeuntil(value, *args)
Пример #2
0
def timeuntil(value, *args):
    if value is None or isinstance(value, Undefined):
        return u''
    from django.utils.timesince import timeuntil

    value = template_localtime(value)
    return timeuntil(value, *args)
Пример #3
0
def time(value, arg=None):
    if value is None or isinstance(value, Undefined):
        return u''
    from django.conf import settings
    from django.utils.dateformat import time_format
    if arg is None:
        arg = settings.TIME_FORMAT

    value = template_localtime(value)
    return time_format(value, arg)
Пример #4
0
def time(value, arg=None):
    if value is None or isinstance(value, Undefined):
        return u""
    from django.conf import settings
    from django.utils.dateformat import time_format

    if arg is None:
        arg = settings.TIME_FORMAT

    value = template_localtime(value)
    return time_format(value, arg)