<s> from django . contrib import admin <EOL> from cab . models import Language , Snippet , SnippetFlag <EOL> class LanguageAdmin ( admin . ModelAdmin ) : <EOL> prepopulated_fields = { '<STR_LIT>' : [ '<STR_LIT:name>' ] } <EOL> class SnippetAdmin ( admin . ModelAdmin ) : <EOL> list_display = ( '<STR_LIT:id>' , '<STR_LIT:title>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> list_filter = ( '<STR_LIT>' , ) <EOL> date_hierarchy = '<STR_LIT>' <EOL> search_fields = ( '<STR_LIT>' , '<STR_LIT:title>' , '<STR_LIT:description>' , '<STR_LIT:code>' , ) <EOL> raw_id_fields = ( '<STR_LIT>' , ) <EOL> class SnippetFlagAdmin ( admin . ModelAdmin ) : <EOL> list_display = ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> list_filter = ( '<STR_LIT>' , ) <EOL> actions = [ '<STR_LIT>' ] <EOL> raw_id_fields = ( '<STR_LIT>' , '<STR_LIT:user>' , ) <EOL> def remove_and_ban ( self , request , queryset ) : <EOL> for obj in queryset : <EOL> obj . remove_and_ban ( ) <EOL> self . message_user ( request , '<STR_LIT>' ) <EOL> remove_and_ban . short_description = '<STR_LIT>' <EOL> admin . site . register ( Language , LanguageAdmin ) <EOL> admin . site . register ( Snippet , SnippetAdmin ) <EOL> admin . site . register ( SnippetFlag , SnippetFlagAdmin ) </s>
