<s> from django . contrib import admin <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from parler . admin import TranslatableAdmin <EOL> from fluent_contents import appsettings <EOL> from fluent_contents . admin import PlaceholderFieldAdmin <EOL> from fluent_utils . dry . admin import MultiSiteAdminMixin <EOL> from . models import SharedContent <EOL> from . import appsettings as sharedcontent_appsettings <EOL> class SharedContentAdmin ( MultiSiteAdminMixin , TranslatableAdmin , PlaceholderFieldAdmin ) : <EOL> """<STR_LIT>""" <EOL> filter_site = appsettings . FLUENT_CONTENTS_FILTER_SITE_ID <EOL> list_display = ( '<STR_LIT:title>' , '<STR_LIT>' ) <EOL> ordering = ( '<STR_LIT>' , ) <EOL> def get_prepopulated_fields ( self , request , obj = None ) : <EOL> if obj is not None and obj . pk : <EOL> return { } <EOL> else : <EOL> return { <EOL> '<STR_LIT>' : ( '<STR_LIT:title>' , ) <EOL> } <EOL> declared_fieldsets = ( <EOL> ( None , { <EOL> '<STR_LIT>' : ( '<STR_LIT:title>' , '<STR_LIT>' ) <EOL> } ) , <EOL> ( _ ( "<STR_LIT>" ) , { <EOL> '<STR_LIT>' : ( '<STR_LIT>' , ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , ) , <EOL> } ) <EOL> ) <EOL> if sharedcontent_appsettings . FLUENT_SHARED_CONTENT_ENABLE_CROSS_SITE : <EOL> declared_fieldsets [ <NUM_LIT:1> ] [ <NUM_LIT:1> ] [ '<STR_LIT>' ] += ( '<STR_LIT>' , ) <EOL> admin . site . register ( SharedContent , SharedContentAdmin ) </s>
