def is_holiday(date1, holidays = getattr(settings, 'SCHOOL_HOLIDAYS', [])):
    for date_start, date_end in holidays:
        if isinstance(date_end, str):
            if date1.date() == date_start.date():
                return True
        elif date1.date() >= date_start.date() and date1.date() <= date_end.date():
            return True
    return False