Here is the program which i wrote and inherited from hr.holidays that if the selected date is before the current date then it should provide an error message. Code-
from datetime import date
if self.date_from <= date.today():
print 'You cannot select the previous date'
But it gives the error-
TypeError: can't compare datetime.date to bool
Thanks