To solve python – django: why am I getting this error: AttributeError: ‘method_descriptor’ object has no attribute ‘today’? error follow below methods.
ERROR LOG
AttributeError: ‘method_descriptor’ object has no attribute ‘today’
How to solve python – django: why am I getting this error: AttributeError: ‘method_descriptor’ object has no attribute ‘today’? ?
Refer the given methods to solve the issue.
You’re presumably looking for “import datetime” rather than “from datetime import datetime.”
“date” is a datetime module class, but it is also a method on the “datetime.datetime” class.
from datetime import datetime, date
from datetime import date
replace
datetime.date.today()
with
date.today()
Hope the above solution works.
Also read :