(value, field)
Localize and format the specified date.

    :param value: The value to process.
    :type value: datetime.date or datetime.time or datetime.datetime
    :param field: The model field instance
    :type field: django.db.models.fields.Field
    :rtype: unicode
Localize and format the specified date.
Localize and format the specified date .
def datetime_renderer(value, field):
    """
    Localize and format the specified date.

    :param value: The value to process.
    :type value: datetime.date or datetime.time or datetime.datetime
    :param field: The model field instance
    :type field: django.db.models.fields.Field
    :rtype: unicode

    """
    if isinstance(value, datetime):
        # django ticket #23466 Removing seconds from locale formats
        return formats.localize(timezone.template_localtime(value))
    elif isinstance(value, (date, time)):
        return ":".join((formats.localize(value)).split(":")[:2])
    else:
        return ":".join(value.split(":")[:2])
def datetime_renderer ( value , field ) : if isinstance ( value , datetime ) : # django ticket #23466 Removing seconds from locale formats return formats . localize ( timezone . template_localtime ( value ) ) elif isinstance ( value , ( date , time ) ) : return ":" . join ( ( formats . localize ( value ) ) . split ( ":" ) [ : 2 ] ) else : return ":" . join ( value . split ( ":" ) [ : 2 ] )