<s> """<STR_LIT>""" <EOL> from django . core . urlresolvers import reverse <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from admin_tools . menu import items , Menu <EOL> from admin_tools . utils import get_admin_site_name <EOL> from fluent_dashboard . items import CmsModelList , ReturnToSiteItem <EOL> from fluent_dashboard . appgroups import get_application_groups <EOL> class FluentMenu ( Menu ) : <EOL> """<STR_LIT>""" <EOL> def init_with_context ( self , context ) : <EOL> """<STR_LIT>""" <EOL> site_name = get_admin_site_name ( context ) <EOL> self . children += [ <EOL> items . MenuItem ( _ ( '<STR_LIT>' ) , reverse ( '<STR_LIT>' . format ( site_name ) ) ) , <EOL> items . Bookmarks ( ) , <EOL> ] <EOL> for title , kwargs in get_application_groups ( ) : <EOL> if kwargs . get ( '<STR_LIT>' , True ) : <EOL> self . children . append ( CmsModelList ( title , ** kwargs ) ) <EOL> self . children += [ <EOL> ReturnToSiteItem ( ) <EOL> ] </s>
