def to_python(self, value):
    if isinstance(value, ModelBase):
        return value
    (app_label, model_name) = value.lower().split('.')
    return apps.get_model(app_label, model_name)
def to_python(self, value):
    if isinstance(value, ModelBase):
        return value
    (app_label, model_name) = value.lower().split('.')
    return apps.get_model(app_label, model_name)