Replace timezone.is_naive with timezone_is_naive.

This commit is contained in:
hackerkid 2017-04-15 07:38:10 +05:30 committed by Tim Abbott
parent 9acc27c2f0
commit 6ddee006bd
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ from django.db import connection
from django.forms.models import model_to_dict
from django.utils import timezone
from django.utils.timezone import utc as timezone_utc
from django.utils.timezone import is_naive as timezone_is_naive
from django.db.models.query import QuerySet
import glob
import logging
@ -178,7 +179,7 @@ def floatify_datetime_fields(data, table):
orig_dt = item[field]
if orig_dt is None:
continue
if timezone.is_naive(orig_dt):
if timezone_is_naive(orig_dt):
logging.warning("Naive datetime:", item)
dt = timezone.make_aware(orig_dt)
else: