#NEWLINE# @ classmethod #NEWLINE# def initialize_type( cls , TYPE_CHOICES = None , cleanse = None ) : #NEWLINE# #INDENT# if ( 'feincms.module.medialibrary' not in django_settings . INSTALLED_APPS ) : #NEWLINE# #INDENT# raise ImproperlyConfigured ( ( "You have to add 'feincms.module.medialibrary' to your INSTALLED_APPS before creating a %s" % cls . __name__ ) ) #NEWLINE# #UNINDENT# if ( TYPE_CHOICES is None ) : #NEWLINE# #INDENT# raise ImproperlyConfigured ( ( 'You need to set TYPE_CHOICES when creating a %s' % cls . __name__ ) ) #NEWLINE# #UNINDENT# cls . add_to_class ( 'type' , models . CharField ( _ ( 'type' ) , max_length = 10 , choices = TYPE_CHOICES , default = TYPE_CHOICES [ 0 ] [ 0 ] ) ) #NEWLINE# if cleanse : #NEWLINE# #INDENT# cls . cleanse = cleanse