<s> from sellmo . contrib . attribute . models import ( Attribute , AttributeSet , <EOL> AttributeChoice , Value ) <EOL> from sellmo . contrib . attribute . admin import ( <EOL> BaseAttributeSetAdmin , AttributeSetParentListFilter ) <EOL> from django . contrib import admin <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> class AttributeChoiceAdmin ( admin . TabularInline ) : <EOL> model = AttributeChoice <EOL> class AttributeAdmin ( admin . ModelAdmin ) : <EOL> list_display = [ '<STR_LIT:name>' , '<STR_LIT:type>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:key>' , '<STR_LIT>' ] <EOL> list_filter = [ '<STR_LIT:type>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> search_fields = [ '<STR_LIT:name>' , '<STR_LIT:key>' ] <EOL> fieldsets = ( <EOL> ( None , { <EOL> '<STR_LIT>' : ( '<STR_LIT:name>' , '<STR_LIT:type>' , '<STR_LIT:key>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> } ) , <EOL> ( _ ( "<STR_LIT>" ) , { <EOL> '<STR_LIT>' : ( '<STR_LIT>' , ) <EOL> } ) , <EOL> ( _ ( "<STR_LIT>" ) , { <EOL> '<STR_LIT>' : ( '<STR_LIT>' , '<STR_LIT>' , ) <EOL> } ) , <EOL> ) <EOL> inlines = [ AttributeChoiceAdmin ] <EOL> class AttributeSetAdmin ( BaseAttributeSetAdmin ) : <EOL> list_display = [ '<STR_LIT>' , '<STR_LIT:name>' , '<STR_LIT>' ] <EOL> list_display_links = [ '<STR_LIT>' , '<STR_LIT:name>' ] <EOL> list_filter = [ AttributeSetParentListFilter ] <EOL> search_fields = [ '<STR_LIT:name>' ] <EOL> fieldsets = ( <EOL> ( None , { <EOL> '<STR_LIT>' : ( '<STR_LIT:name>' , '<STR_LIT>' ) <EOL> } ) , <EOL> ( _ ( "<STR_LIT>" ) , { <EOL> '<STR_LIT>' : ( '<STR_LIT>' , ) <EOL> } ) , <EOL> ) <EOL> def full_name ( self , instance ) : <EOL> return instance . full_name <EOL> full_name . short_description = _ ( "<STR_LIT>" ) <EOL> raw_id_fields = [ '<STR_LIT>' ] <EOL> class ValueAdmin ( admin . ModelAdmin ) : <EOL> list_display = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:value>' ] <EOL> list_filter = [ '<STR_LIT>' ] <EOL> search_fields = [ '<STR_LIT>' ] <EOL> def value ( self , obj ) : <EOL> return obj . get_value ( ) <EOL> admin . site . register ( Attribute , AttributeAdmin ) <EOL> admin . site . register ( AttributeSet , AttributeSetAdmin ) <EOL> admin . site . register ( Value , ValueAdmin ) </s>
