

def add_to_class(self, model_class, name):
    '\n        Hook that replaces the `Field` attribute on a class with a named\n        `FieldDescriptor`. Called by the metaclass during construction of the\n        `Model`.\n        '
    self.name = name
    self.model_class = model_class
    self.db_column = (self.db_column or self.name)
    if (not self.verbose_name):
        self.verbose_name = re.sub('_+', ' ', name).title()
    model_class._meta.add_field(self)
    setattr(model_class, name, FieldDescriptor(self))
    self._is_bound = True

dataset/ETHPy150Open coleifer/peewee/peewee.py Field.add_to_class/original