def __init__(self, startdate, enddate, timezone=None, **kwargs):
        super(RandomDatetime, self).__init__(**kwargs)
        if not (isinstance(startdate, datetime.datetime) and
                isinstance(enddate, datetime.datetime)):
            raise AttributeError(
                "startdate and enddate must be instances of datetime.datetime")
        if enddate < startdate:
            raise AttributeError(
                "enddate must be after startdate"
            )
        self.startdate = startdate
        self.enddate = enddate
        self.timezone = timezone
dataset/ETHPy150Open sbaechler/django-scaffolding/scaffolding/tubes.py/RandomDatetime.__init__/original