<s> from django . contrib import admin <EOL> from inline_media . fields import TextFieldWithInlines <EOL> from inline_media . models import License , Picture , PictureSet <EOL> from inline_media . widgets import TextareaWithInlines <EOL> class LicenseAdmin ( admin . ModelAdmin ) : <EOL> list_display = ( "<STR_LIT:name>" , "<STR_LIT>" ) <EOL> list_filter = ( "<STR_LIT>" , ) <EOL> search_fields = ( "<STR_LIT:name>" , "<STR_LIT>" ) <EOL> class AdminTextFieldWithInlinesMixin ( object ) : <EOL> """<STR_LIT>""" <EOL> def formfield_for_dbfield ( self , db_field , ** kwargs ) : <EOL> if isinstance ( db_field , TextFieldWithInlines ) : <EOL> return db_field . formfield ( widget = TextareaWithInlines ) <EOL> sup = super ( AdminTextFieldWithInlinesMixin , self ) <EOL> return sup . formfield_for_dbfield ( db_field , ** kwargs ) <EOL> class PictureAdmin ( admin . ModelAdmin ) : <EOL> list_display = ( "<STR_LIT>" , "<STR_LIT:title>" , "<STR_LIT>" ) <EOL> list_editable = ( "<STR_LIT:title>" , ) <EOL> list_filter = ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) <EOL> search_fields = ( "<STR_LIT:title>" , "<STR_LIT>" , "<STR_LIT:description>" , "<STR_LIT>" ) <EOL> date_hierarchy = "<STR_LIT>" <EOL> fieldsets = ( <EOL> ( None , { "<STR_LIT>" : ( ( "<STR_LIT:title>" , "<STR_LIT>" ) , <EOL> "<STR_LIT>" , <EOL> ( "<STR_LIT:description>" , "<STR_LIT>" ) , <EOL> "<STR_LIT>" , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> "<STR_LIT>" , ) , } ) , <EOL> ) <EOL> readonly_fields = ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , ) <EOL> list_per_page = <NUM_LIT:50> <EOL> class Media : <EOL> css = { "<STR_LIT:all>" : ( "<STR_LIT>" , ) } <EOL> js = ( "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" ) <EOL> class PictureSetAdmin ( admin . ModelAdmin ) : <EOL> list_display = ( "<STR_LIT:title>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" ) <EOL> list_filter = ( "<STR_LIT>" , ) <EOL> search_fields = ( "<STR_LIT:title>" , "<STR_LIT>" , "<STR_LIT:description>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" ) <EOL> date_hierarchy = "<STR_LIT>" <EOL> prepopulated_fields = { '<STR_LIT>' : ( '<STR_LIT:title>' , ) } <EOL> filter_horizontal = ( "<STR_LIT>" , ) <EOL> fieldsets = ( <EOL> ( None , { '<STR_LIT>' : ( '<STR_LIT:title>' , '<STR_LIT>' , <EOL> ( '<STR_LIT:description>' , '<STR_LIT>' ) , <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' ) , } ) , <EOL> ) <EOL> list_per_page = <NUM_LIT:50> <EOL> class Media : <EOL> css = { "<STR_LIT:all>" : ( "<STR_LIT>" , ) } <EOL> js = ( "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" ) <EOL> admin . site . register ( License , LicenseAdmin ) <EOL> admin . site . register ( Picture , PictureAdmin ) <EOL> admin . site . register ( PictureSet , PictureSetAdmin ) </s>
