<s> from satchmo_store . contact . models import Organization , Contact , Interaction , PhoneNumber , AddressBook , ContactOrganization , ContactOrganizationRole , ContactRole , ContactInteractionType <EOL> from satchmo_utils . admin import AutocompleteAdmin <EOL> from django . contrib import admin <EOL> class Contact_Inline ( admin . TabularInline ) : <EOL> model = Contact <EOL> extra = <NUM_LIT:1> <EOL> class PhoneNumber_Inline ( admin . TabularInline ) : <EOL> model = PhoneNumber <EOL> extra = <NUM_LIT:1> <EOL> class AddressBook_Inline ( admin . StackedInline ) : <EOL> model = AddressBook <EOL> extra = <NUM_LIT:1> <EOL> class OrganizationOptions ( admin . ModelAdmin ) : <EOL> list_filter = [ '<STR_LIT:type>' , '<STR_LIT>' ] <EOL> list_display = [ '<STR_LIT:name>' , '<STR_LIT:type>' , '<STR_LIT>' ] <EOL> class ContactOptions ( AutocompleteAdmin ) : <EOL> list_display = ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> list_filter = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ordering = [ '<STR_LIT>' ] <EOL> search_fields = ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:email>' ) <EOL> related_search_fields = { '<STR_LIT:user>' : ( '<STR_LIT:username>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:email>' ) } <EOL> related_string_functions = { '<STR_LIT:user>' : lambda u : u"<STR_LIT>" % ( u . username , u . get_full_name ( ) ) } <EOL> inlines = [ PhoneNumber_Inline , AddressBook_Inline ] <EOL> class InteractionOptions ( admin . ModelAdmin ) : <EOL> list_filter = [ '<STR_LIT:type>' , '<STR_LIT>' ] <EOL> class ContactOrganizationOptions ( admin . ModelAdmin ) : <EOL> pass <EOL> class ContactRoleOptions ( admin . ModelAdmin ) : <EOL> pass <EOL> class ContactOrganizationRoleOptions ( admin . ModelAdmin ) : <EOL> pass <EOL> class ContactInteractionTypeOptions ( admin . ModelAdmin ) : <EOL> pass <EOL> admin . site . register ( Organization , OrganizationOptions ) <EOL> admin . site . register ( Contact , ContactOptions ) <EOL> admin . site . register ( Interaction , InteractionOptions ) <EOL> admin . site . register ( ContactOrganization , ContactOrganizationOptions ) <EOL> admin . site . register ( ContactOrganizationRole , ContactOrganizationRoleOptions ) <EOL> admin . site . register ( ContactRole , ContactRoleOptions ) <EOL> admin . site . register ( ContactInteractionType , ContactInteractionTypeOptions ) </s>
