TypeError: descriptor 'date' requires a 'datetime.datetime' object but received a 'int'
Change your import statement from:
from datetime import datetime
to
import datetime
As when you say from datetime import datetime
you are just importing one method and that and not the whole module. And you haven't imported the date
method.
You could also do this:
>>> from datetime import date
>>> date(2018, 9, 20)
datetime.date(2018, 9, 20)