Django 입력 시간 오류 Runtime Warning: DateTime Field Grades.gdate received a naive datetime

472 단어
Django에서 시간 할당 오류
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/db/models/fields/__init__.py:1423: RuntimeWarning: DateTimeField Grades.gdate received a naive datetime (2017-06-12 00:00:00) while time zone support is active.

해결 방법: settings의 USETZ를 False로 설정
LANGUAGE_CODE = 'zh-Hans'

TIME_ZONE = 'Asia/Shanghai'

USE_I18N = True

USE_L10N = True

USE_TZ = False

좋은 웹페이지 즐겨찾기