def __init__(self, model, name, label=None, description=None, type_name=None):
    self.model = model
    self.label = label
    self.name = name
    self.description = description
    for field in model._meta.fields:
        if (field.name == name):
            self.label = field.verbose_name
            self.description = field.help_text
    self.__registry.setdefault(model, {})
    if isinstance(type_name, list):
        for single_type in type_name:
            self.__registry[model].setdefault(single_type, [])
            self.__registry[model][single_type].append(self)
    else:
        self.__registry[model].setdefault(type_name, [])
        self.__registry[model][type_name].append(self)
def __init__(self, model, name, label=None, description=None, type_name=None):
    self.model = model
    self.label = label
    self.name = name
    self.description = description
    for field in model._meta.fields:
        if (field.name == name):
            self.label = field.verbose_name
            self.description = field.help_text
    self.__registry.setdefault(model, {})
    if isinstance(type_name, list):
        for single_type in type_name:
            self.__registry[model].setdefault(single_type, [])
            self.__registry[model][single_type].append(self)
    else:
        self.__registry[model].setdefault(type_name, [])
        self.__registry[model][type_name].append(self)