Did I find the right examples for you? yes no

All Samples(12)  |  Call(0)  |  Derive(0)  |  Import(12)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/t/r/treeherder-service-HEAD/vendor/rest_framework/fields.py   treeherder-service(Download)
from django.utils.translation import ugettext_lazy as _
from django.utils.datastructures import SortedDict
from rest_framework import ISO_8601
from rest_framework.compat import (
    timezone, parse_date, parse_datetime, parse_time, BytesIO, six, smart_text,
def readable_datetime_formats(formats):
    format = ', '.join(formats).replace(ISO_8601,
             'YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HHMM|-HHMM|Z]')
    return humanize_strptime(format)
 
 
def readable_date_formats(formats):
    format = ', '.join(formats).replace(ISO_8601, 'YYYY[-MM[-DD]]')
def readable_time_formats(formats):
    format = ', '.join(formats).replace(ISO_8601, 'hh:mm[:ss[.uuuuuu]]')
    return humanize_strptime(format)
 
 
 
        for format in self.input_formats:
            if format.lower() == ISO_8601:
                try:
                    parsed = parse_date(value)

src/d/j/djangorestframework-2.3.13/rest_framework/fields.py   djangorestframework(Download)
from django.utils.translation import ugettext_lazy as _
from django.utils.datastructures import SortedDict
from rest_framework import ISO_8601
from rest_framework.compat import (
    timezone, parse_date, parse_datetime, parse_time, BytesIO, six, smart_text,
def readable_datetime_formats(formats):
    format = ', '.join(formats).replace(ISO_8601,
             'YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HHMM|-HHMM|Z]')
    return humanize_strptime(format)
 
 
def readable_date_formats(formats):
    format = ', '.join(formats).replace(ISO_8601, 'YYYY[-MM[-DD]]')
def readable_time_formats(formats):
    format = ', '.join(formats).replace(ISO_8601, 'hh:mm[:ss[.uuuuuu]]')
    return humanize_strptime(format)
 
 
 
        for format in self.input_formats:
            if format.lower() == ISO_8601:
                try:
                    parsed = parse_date(value)

src/d/j/django-rest-framework-HEAD/rest_framework/fields.py   django-rest-framework(Download)
from django.utils.translation import ugettext_lazy as _
from django.utils.datastructures import SortedDict
from rest_framework import ISO_8601
from rest_framework.compat import (
    timezone, parse_date, parse_datetime, parse_time, BytesIO, six, smart_text,
def readable_datetime_formats(formats):
    format = ', '.join(formats).replace(ISO_8601,
             'YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z]')
    return humanize_strptime(format)
 
 
def readable_date_formats(formats):
    format = ', '.join(formats).replace(ISO_8601, 'YYYY[-MM[-DD]]')
def readable_time_formats(formats):
    format = ', '.join(formats).replace(ISO_8601, 'hh:mm[:ss[.uuuuuu]]')
    return humanize_strptime(format)
 
 
 
        for format in self.input_formats:
            if format.lower() == ISO_8601:
                try:
                    parsed = parse_date(value)

src/l/i/lightforum-HEAD/rest_framework/fields.py   lightforum(Download)
from django.utils.translation import ugettext_lazy as _
from django.utils.datastructures import SortedDict
from rest_framework import ISO_8601
from rest_framework.compat import (
    timezone, parse_date, parse_datetime, parse_time, BytesIO, six, smart_text,
def readable_datetime_formats(formats):
    format = ', '.join(formats).replace(ISO_8601,
             'YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HHMM|-HHMM|Z]')
    return humanize_strptime(format)
 
 
def readable_date_formats(formats):
    format = ', '.join(formats).replace(ISO_8601, 'YYYY[-MM[-DD]]')
def readable_time_formats(formats):
    format = ', '.join(formats).replace(ISO_8601, 'hh:mm[:ss[.uuuuuu]]')
    return humanize_strptime(format)
 
 
 
        for format in self.input_formats:
            if format.lower() == ISO_8601:
                try:
                    parsed = parse_date(value)

src/t/r/treeherder-service-HEAD/vendor/rest_framework/settings.py   treeherder-service(Download)
from django.utils import importlib
 
from rest_framework import ISO_8601
from rest_framework.compat import six
 
    # Input and output formats
    'DATE_INPUT_FORMATS': (
        ISO_8601,
    ),
    'DATE_FORMAT': None,
 
    'DATETIME_INPUT_FORMATS': (
        ISO_8601,
 
    'TIME_INPUT_FORMATS': (
        ISO_8601,
    ),
    'TIME_FORMAT': None,

src/d/j/djangorestframework-2.3.13/rest_framework/settings.py   djangorestframework(Download)
from django.utils import importlib
 
from rest_framework import ISO_8601
from rest_framework.compat import six
 
    # Input and output formats
    'DATE_INPUT_FORMATS': (
        ISO_8601,
    ),
    'DATE_FORMAT': None,
 
    'DATETIME_INPUT_FORMATS': (
        ISO_8601,
 
    'TIME_INPUT_FORMATS': (
        ISO_8601,
    ),
    'TIME_FORMAT': None,

src/d/j/django-rest-framework-HEAD/rest_framework/settings.py   django-rest-framework(Download)
from django.utils import importlib
 
from rest_framework import ISO_8601
from rest_framework.compat import six
 
    # Input and output formats
    'DATE_INPUT_FORMATS': (
        ISO_8601,
    ),
    'DATE_FORMAT': None,
 
    'DATETIME_INPUT_FORMATS': (
        ISO_8601,
 
    'TIME_INPUT_FORMATS': (
        ISO_8601,
    ),
    'TIME_FORMAT': None,

src/l/i/lightforum-HEAD/rest_framework/settings.py   lightforum(Download)
from django.utils import importlib
 
from rest_framework import ISO_8601
from rest_framework.compat import six
 
    # Input and output formats
    'DATE_INPUT_FORMATS': (
        ISO_8601,
    ),
    'DATE_FORMAT': None,
 
    'DATETIME_INPUT_FORMATS': (
        ISO_8601,
 
    'TIME_INPUT_FORMATS': (
        ISO_8601,
    ),
    'TIME_FORMAT': None,

src/d/r/drf-compound-fields-HEAD/tests/test_listoritemfield.py   drf-compound-fields(Download)
 
from django.core.exceptions import ValidationError
from rest_framework import ISO_8601
from rest_framework.fields import CharField
from rest_framework.fields import DateField
    logic.
    """
    field = ListOrItemField(DateField(format=ISO_8601))
    data = field.to_native([date.today()])
    assert [date.today().isoformat()] == data
    from-native logic.
    """
    field = ListOrItemField(DateField(format=ISO_8601))
    data = field.from_native([date.today().isoformat()])
    assert [date.today()] == data
    logic.
    """
    field = ListOrItemField(DateField(format=ISO_8601))
    data = field.to_native(date.today())
    assert date.today().isoformat() == data
    from-native logic.
    """
    field = ListOrItemField(DateField(format=ISO_8601))
    data = field.from_native(date.today().isoformat())
    assert date.today() == data

src/d/r/drf-compound-fields-HEAD/tests/test_listfield.py   drf-compound-fields(Download)
 
from django.core.exceptions import ValidationError
from rest_framework import ISO_8601
from rest_framework.fields import CharField
from rest_framework.fields import DateField
    the application of the item-field's to_native method to each element of the input object list.
    """
    field = ListField(DateField(format=ISO_8601))
    obj = [date(2000, 1, 1), date(2000, 1, 2)]
    data = field.to_native(obj)

  1 | 2  Next