#NEWLINE# def __init__( self , verbose_name = None , name = None , markup_type = None , default_markup_type = None , markup_choices = _MARKUP_TYPES , escape_html = False , **kwargs ) : #NEWLINE# #INDENT# if ( markup_type and default_markup_type ) : #NEWLINE# #INDENT# raise ValueError ( 'Cannot specify both markup_type and default_markup_type' ) #NEWLINE# #UNINDENT# self . default_markup_type = ( markup_type or default_markup_type ) #NEWLINE# self . markup_type_editable = ( markup_type is None ) #NEWLINE# self . escape_html = escape_html #NEWLINE# self . markup_choices_list = [ mc [ 0 ] for mc in markup_choices ] #NEWLINE# self . markup_choices_dict = dict ( ( ( mc [ 0 ] , mc [ 1 ] ) for mc in markup_choices ) ) #NEWLINE# self . markup_choices_title = [ ] #NEWLINE# for mc in markup_choices : #NEWLINE# #INDENT# if ( len ( mc ) == 3 ) : #NEWLINE# #INDENT# self . markup_choices_title . append ( markup_choices [ 2 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . markup_choices_title . append ( mc [ 0 ] ) #NEWLINE# #UNINDENT# #UNINDENT# if ( self . default_markup_type and ( self . default_markup_type not in self . markup_choices_list ) ) : #NEWLINE# #INDENT# raise ValueError ( ( "Invalid default_markup_type for field '%s', allowed values: %s" % ( name , ', ' . join ( self . markup_choices_list ) ) ) ) #NEWLINE# #UNINDENT# self . rendered_field = ( not kwargs . pop ( 'rendered_field' , False ) ) #NEWLINE# super ( MarkupField , self ) . __init__ ( verbose_name , name , ** kwargs )