'Prevent opening of the survey if the deadline has turned out
! This will NOT disallow access to users who have already partially filled the survey !'

def _check_deadline(self, user_input):

    deadline = user_input.deadline
    if deadline:
        dt_deadline = fields.Datetime.from_string(deadline)
        dt_now = datetime.now()
        if (dt_now > dt_deadline):
            return request.render('survey.notopen')
    return None
