I am concerned with a script that involves datetime module. I have to suppress 'object received a naive datetime while timezone is active' as there are other print statements in the script. My code is as below
script:
from datetime import datetime
date = datetime.now()
objName = className.objects.create(param=value, param=value, param=value, time=date, attachment=attachment)
models.py
class className(models.MOdel):
t = models.DateTimeField(null=True, blank=True)
How can I suppress naive datetime warnings?