

@classmethod
def initialize_type(cls, TYPE_CHOICES=None):
    if (TYPE_CHOICES is None):
        raise ImproperlyConfigured(('You have to set TYPE_CHOICES when creating a %s' % cls.__name__))
    cls.add_to_class('type', models.CharField(_('type'), max_length=20, choices=TYPE_CHOICES, default=TYPE_CHOICES[0][0]))

dataset/ETHPy150Open feincms/feincms/feincms/content/medialibrary/models.py MediaFileContent.initialize_type/original