解决RuntimeWarning: DateTimeField User.last_login received a naive datetime
把代码中设置的 "今天" 改为 timezone.now()
例子:
from datetime import date
from django.utils import timezone
now_date = date.today() 改为 now_date = timzone.now()
把代码中设置的 "今天" 改为 timezone.now()
例子:
from datetime import date
from django.utils import timezone
now_date = date.today() 改为 now_date = timzone.now()