<s> from django import conf <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from horizon import tabs <EOL> class OverviewTab ( tabs . Tab ) : <EOL> name = _ ( "<STR_LIT>" ) <EOL> slug = "<STR_LIT>" <EOL> template_name = "<STR_LIT>" <EOL> def get_context_data ( self , request ) : <EOL> image = self . tab_group . kwargs [ '<STR_LIT:image>' ] <EOL> custom_titles = getattr ( conf . settings , <EOL> '<STR_LIT>' , { } ) <EOL> image_props = [ ] <EOL> for prop , val in image . properties . items ( ) : <EOL> if prop == '<STR_LIT:description>' : <EOL> continue <EOL> title = custom_titles . get ( prop , prop ) <EOL> image_props . append ( ( prop , title , val ) ) <EOL> return { "<STR_LIT:image>" : image , <EOL> "<STR_LIT>" : sorted ( image_props , key = lambda prop : prop [ <NUM_LIT:1> ] ) } <EOL> class ImageDetailTabs ( tabs . TabGroup ) : <EOL> slug = "<STR_LIT>" <EOL> tabs = ( OverviewTab , ) </s>
