def create_models(db):

    class Model1(db.Document):
        test1 = db.StringField(max_length=20)
        test2 = db.StringField(max_length=20)
        test3 = db.StringField()
        test4 = db.StringField()
        datetime_field = db.DateTimeField()

        def __str__(self):
            return self.test1

    class Model2(db.Document):
        string_field = db.StringField()
        int_field = db.IntField()
        float_field = db.FloatField()
        bool_field = db.BooleanField()
        model1 = db.ReferenceField(Model1)
    Model1.objects.delete()
    Model2.objects.delete()
    return (Model1, Model2)
def create_models(db):

    class Model1(db.Document):
        test1 = db.StringField(max_length=20)
        test2 = db.StringField(max_length=20)
        test3 = db.StringField()
        test4 = db.StringField()
        datetime_field = db.DateTimeField()

        def __str__(self):
            return self.test1

    class Model2(db.Document):
        string_field = db.StringField()
        int_field = db.IntField()
        float_field = db.FloatField()
        bool_field = db.BooleanField()
        model1 = db.ReferenceField(Model1)
    Model1.objects.delete()
    Model2.objects.delete()
    return (Model1, Model2)