- _value_models = []
-
- @staticmethod
- def register_value_model(model):
- if issubclass(model, models.Model):
- model_name = _ct_model_name(model)
- if model_name not in CollectionMember._value_models:
- CollectionMember._value_models.append(model_name)
- else:
- raise TypeError('CollectionMember.register_value_model only accepts subclasses of django.db.models.Model')
-
- @staticmethod
- def unregister_value_model(model):
- if issubclass(model, models.Model):
- model_name = _ct_model_name(model)
- if model_name in CollectionMember._value_models:
- CollectionMember._value_models.remove(model_name)
- else:
- raise TypeError('CollectionMember.unregister_value_model only accepts subclasses of django.db.models.Model')
-