mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Removed unnecessary utc wrapper. (#4839)
This commit is contained in:
parent
247954d497
commit
5c0f9f147c
|
@ -312,12 +312,3 @@ def set_many(instance, field, value):
|
|||
else:
|
||||
field = getattr(instance, field)
|
||||
field.set(value)
|
||||
|
||||
|
||||
try:
|
||||
# A `utc` instance is available in Django 1.11+
|
||||
from django.utils.timezone import utc
|
||||
except ImportError:
|
||||
# A `UTC` class is available in older versions
|
||||
from django.utils.timezone import UTC
|
||||
utc = UTC()
|
||||
|
|
|
@ -28,11 +28,12 @@ from django.utils.encoding import is_protected_type, smart_text
|
|||
from django.utils.formats import localize_input, sanitize_separators
|
||||
from django.utils.functional import cached_property
|
||||
from django.utils.ipv6 import clean_ipv6_address
|
||||
from django.utils.timezone import utc
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from rest_framework import ISO_8601
|
||||
from rest_framework.compat import (
|
||||
get_remote_field, unicode_repr, unicode_to_repr, utc, value_from_object
|
||||
get_remote_field, unicode_repr, unicode_to_repr, value_from_object
|
||||
)
|
||||
from rest_framework.exceptions import ErrorDetail, ValidationError
|
||||
from rest_framework.settings import api_settings
|
||||
|
|
|
@ -9,10 +9,10 @@ import pytest
|
|||
from django.http import QueryDict
|
||||
from django.test import TestCase, override_settings
|
||||
from django.utils import six
|
||||
from django.utils.timezone import utc
|
||||
|
||||
import rest_framework
|
||||
from rest_framework import serializers
|
||||
from rest_framework.compat import utc
|
||||
from rest_framework.fields import is_simple_callable
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue
Block a user