def init_with_context(self, context): # Links module self.children.append( modules.LinkList( u'Administration', children=[self._create_link(**l) for l in ADMIN_LINKS])) # Models module self.children.append( modules.Group(u'Models', display=u'accordion', children=[ self._create_model_group(**g) for g in ADMIN_MODEL_GROUPS ])) # Recent actions module self.children.append(modules.RecentActions('Recent Actions', limit=5)) # Pages self.children.append( modules.LinkList(u'Pages', children=[ self._create_link(n, u'admin:pages_index', [l]) for l, n in settings.LANGUAGES ]))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append(modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [_('Return to site'), '/'], [_('Change password'), reverse('%s:password_change' % site_name)], [_('Log out'), reverse('%s:logout' % site_name)], ] )) # append an app list module for "Applications" self.children.append(modules.AppList( _('Applications'), exclude=('django.contrib.*',), )) # append an app list module for "Administration" self.children.append(modules.AppList( _('Administration'), models=('django.contrib.*',), )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5)) # append a feed module self.children.append(modules.Feed( _('Latest Django News'), feed_url='http://www.djangoproject.com/rss/weblog/', limit=5 )) # append another link list module for "support". self.children.append(modules.LinkList( _('Support'), children=[ { 'title': _('Django documentation'), 'url': 'http://docs.djangoproject.com/', 'external': True, }, { 'title': _('Django "django-users" mailing list'), 'url': 'http://groups.google.com/group/django-users', 'external': True, }, { 'title': _('Django irc channel'), 'url': 'irc://irc.freenode.net/django', 'external': True, }, ] ))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [_('Return to site'), '/'], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ])) # append an app list module for "Applications" self.children.append( modules.AppList( _('Applications'), exclude=('django.contrib.*', ), )) # append an app list module for "Administration" self.children.append( modules.AppList( _('Administration'), models=('django.contrib.*', ), )) # append another link list module for "support". self.children.append( modules.LinkList(_('Results'), children=[{ 'title': _('Results'), 'url': reverse('survey_list'), 'external': False, }])) from surveys.utils import get_last_survey survey = get_last_survey() self.children.append( TableDashboard(title='Last Survey Top Questions', children=survey.top_questions, headers=[ 'Plulication Date', 'Code', 'Question', 'Total Count' ], fields=[ 'pub_date', 'slug', 'question_text', 'user_choices_count' ])) self.children.append( ChartDashboard(title='Survey Chart', chart_id=1, childrens=[]))
def init_with_context(self, context): self.title = '1997 站点管理' site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('快速链接'), layout='inline', draggable=True, deletable=False, collapsible=False, children=[ [_('返回站点首页'), '/'], [_('修改密码'), reverse('%s:password_change' % site_name)], [_('注销'), reverse('%s:logout' % site_name)], ])) # append an app list module for "Applications" self.children.append( modules.AppList( _('应用'), exclude=('django.contrib.*', ), )) # append an app list module for "Administration" self.children.append( modules.AppList( _('管理员设置'), models=('django.contrib.*', ), )) # append a recent actions module self.children.append(modules.RecentActions(_('近期操作'), 5)) # append a feed module # self.children.append(modules.Feed( # _('Latest Django News'), # feed_url='http://www.djangoproject.com/rss/weblog/', # limit=5 # )) # append another link list module for "support". self.children.append( modules.LinkList(_('其他管理页面'), children=[ { 'title': _('预约管理'), 'url': '/admin/r', 'external': True, }, { 'title': _('教师时段管理'), 'url': '/admin/t', 'external': True, }, ]))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [_('Return to site'), '/'], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ])) # append an app list module for "Applications" self.children.append( modules.AppList( _('Applications'), exclude=('django.contrib.*', ), )) # append an app list module for "Administration" self.children.append( modules.AppList( _('Administration'), models=('django.contrib.*', ), )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5)) # append a feed module self.children.append( modules.Feed(_('Latest Django News'), feed_url='http://www.djangoproject.com/rss/weblog/', limit=5)) # append another link list module for "support". self.children.append( modules.LinkList(_('SivaMS Links'), children=[ { 'title': _('Client Credit Card Charge'), 'url': '/admin/client/charge', 'external': True, }, ]))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [_('Return to site'), '/'], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ])) # append an app list module for "Applications" self.children.append( modules.AppList( _('Приложения'), exclude=('django.contrib.*', ), )) self.children.append( MyModule(title=u"Приветствие", message=u' Добро пожаловать!')) # append another link list module for "support". self.children.append( modules.LinkList( _('Support'), children=[ { 'title': _('Django documentation'), 'url': 'http://docs.djangoproject.com/', 'external': True, }, { 'title': _('Django "django-users" mailing list'), 'url': 'http://groups.google.com/group/django-users', 'external': True, }, { 'title': _('Django irc channel'), 'url': 'irc://irc.freenode.net/django', 'external': True, }, ]))
def init_with_context(self, context): site_name = get_admin_site_name(context) if context['request'].user.is_superuser: self.children.append(ConfigModule()) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [_('Return to site'), '/'], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ])) # append a link list module for "filebrowser" self.children.append( modules.LinkList( _('FileBrowser'), children=[ [_('FileBrowser'), '/admin/filebrowser/browse/'], ])) # append an app list module for "Applications" self.children.append( modules.AppList( _('Applications'), exclude=('django.contrib.*', ), )) # append an app list module for "Administration" self.children.append( modules.AppList( _('Administration'), models=('django.contrib.*', ), )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append an app list module for "Administration" self.children.append( modules.ModelList( _('Administration'), models=('django.contrib.*', 'social_auth.*'), )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5)) # append another link list module for "support". self.children.append( modules.LinkList(_('Support'), children=[ { 'title': _('Sigurd project website'), 'url': 'http://sigurd.webriders.com.ua', 'external': True, }, { 'title': _('Django Dash 2011'), 'url': 'http://djangodash.com', 'external': True, }, ]))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [_('Return to site'), '/'], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ])) # append an app list module for "Applications" self.children.append( modules.AppList( _('Applications'), exclude=('django.contrib.*', ), )) # append an app list module for "Administration" # self.children.append(modules.AppList( # _('Administration'), # models=('django.contrib.*',), # )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _("Quick links"), layout="inline", draggable=False, deletable=False, collapsible=False, children=[ [ _("Change password"), reverse("%s:password_change" % site_name) ], [_("Log out"), reverse("%s:logout" % site_name)], ], )) # append an app list module for "Applications" self.children.append( modules.AppList(_("Applications"), exclude=("django.contrib.*", ))) # append a recent actions module self.children.append(modules.RecentActions(_("Recent Actions"), 5))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList(_('Quick links'), layout='inline', children=[ { 'title': u'Выгрузить клиентов в excel', 'url': 'customers/customer/xlsx/', }, ])) # append an app list module for "Applications" self.children.append( modules.AppList( _('Applications'), exclude=('django.contrib.*', ), )) # append an app list module for "Administration" self.children.append( modules.AppList( _('Administration'), models=('django.contrib.*', ), )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [u'Настройки сайта', '/settings/MyApp'], [_('Return to site'), '/'], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ])) self.children.append( modules.ModelList( title=u'Страницы', models=('pages.models.Page', ), )) self.children.append( modules.ModelList( title=u'Прайс', models=( 'price.models.Category', 'price.models.SubCategory', 'price.models.Item', ), )) self.children.append( modules.ModelList( title=u'Заказы', models=('order.models.Order', ), )) self.children.append( modules.ModelList( title=u'Обратная связь', models=('feedback.models.Request', ), )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5)) self.children.append( modules.ModelList( title=u'Пользователи', models=( 'django.contrib.auth.*', 'users.models.Profile', ), ))
def init_with_context(self, context): self.children.append(apps_group) self.children.append(ZinniaStatistics()) self.children.append(QuickEntry()) self.children.append(DraftEntries()) self.children.append(Comments()) self.children.append(Linkbacks()) self.children.append(modules.RecentActions(_('Recent Actions'), 5)) self.children.append( modules.LinkList( _('Zinnia support'), children=[{ 'title': _('Online documentation'), 'url': 'http://django-blog-zinnia.readthedocs.org/', 'external': True, }, { 'title': _('Mailing list'), 'url': 'http://groups.google.com/group/django-blog-zinnia/', 'external': True, }, { 'title': _('Issue tracker'), 'url': 'https://github.com/Fantomas42/django-blog-zinnia/issues', 'external': True, }])) self.children.append( modules.Feed( _('Recent commits on Zinnia'), feed_url= 'https://github.com/Fantomas42/django-blog-zinnia/commits/develop.atom', limit=5))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [_('List of patiens'), '/cards/card/usercard/'], [_('Add patient'), '/cards/card/usercard/add/'], [_('Log out'), reverse('%s:logout' % site_name)], ])) # Birthday module self.children.append(BirthdayModule(title=_("Birday"), message=u' ')) # Search patients module self.children.append( SearchPatientModule(title=_("Find patient"), message=u' ')) # append an app list module for "Applications" self.children.append( modules.AppList( _('Applications'), exclude=('django.contrib.*', ), )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _("Quick links"), layout="inline", draggable=False, deletable=False, collapsible=False, children=[ [ _("Change password"), reverse("%s:password_change" % site_name) ], [_("Log out"), reverse("%s:logout" % site_name)], ])) self.children.append( modules.ModelList( title=u"Пользователи", models=("core.apps.account.models.TelegramAccount", ), )) self.children.append( modules.ModelList( title=u"Кошельки", models=("core.apps.wallet.models.Wallet", ), )) # append a recent actions module self.children.append(modules.RecentActions(_("Recent Actions"), 5))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( ModelAdd(None, model=Story, text='Create new Story')) self.children.append( OwnInstancesList(_('My Stories'), model=Story, key='authors')) self.children.append( modules.AppList(title='Tumblelog', models=('tumblelog.*', ))) self.children.append( modules.LinkList('bookmarklet', children=[{ 'title': 'luminous flux bookmarklet', 'url': generate_bookmarklink(context['request']) }])) self.children.append( modules.AppList(title='Static Content', models=('django.contrib.flatpages.*', ))) self.children.append( CreateForInstance(model=ChangeSuggestion, instances=Story.objects.all(), key='story')) self.children.append( OwnInstancesList(_('My Suggestions'), model=ChangeSuggestion, key='user'))
def init_with_context(self, context): request = context['request'] # we want a 3 columns layout self.columns = 3 site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [_('Return to site'), '/'], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ])) # append an app list module for "Applications" self.children.append( modules.AppList( _('Applications'), exclude=('django.contrib.*', 'axes', 'admin_honeypot'), )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5)) # self.children += [SalesChart('Sales', interval='days', days=30)] # append another link list module for "support". self.children.append( modules.LinkList(_('PyFreeBilling Support'), children=[ { 'title': _('PyFreeBilling documentation'), 'url': 'http://www.blog-des-telecoms.com/', 'external': True, }, ]))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [u'Настройки сайта', '/settings/MyApp'], [_('Return to site'), '/'], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ])) self.children.append( modules.ModelList( title=u'Страницы и Контент', models=( 'menu.models.Menu', 'pages.models.Page', 'gallery.models.Photo', 'news.models.Article', 'programs.models.Program', 'review.models.Review', 'slideshow.models.Slider', 'partners.models.Partner', ), )) self.children.append( modules.ModelList( title=u'Заявки и Подписки', models=( 'order.models.Order', 'homeform.models.OrderH', 'subscribe.models.Subscribe', ), )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5)) self.children.append( modules.ModelList( title=u'Пользователи', models=( 'django.contrib.auth.*', 'users.models.Profile', ), ))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick Links'), layout='inline', # draggable=False, deletable=False, # collapsible=False, children=[ [_('Return to site'), '/'], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ])) # append an app list module for "Content" self.children.append( modules.AppList( _('Content'), models=itemlist_content, )) # append an app list module for "Miscellaneous" self.children.append( modules.AppList( _('Miscellaneous'), exclude=itemlist_misc_exclude, )) # append an app list module for "Structure" self.children.append( modules.AppList( _('Site Structure'), models=itemlist_structure, )) # append an app list module for "SL" self.children.append( modules.AppList( _('Second Life Systems'), models=itemlist_sl, )) # append an app list module for "System Management" self.children.append( modules.AppList( _('System Management'), models=itemlist_system, )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 10))
def init_with_context(self, context): #site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', draggable=True, deletable=True, collapsible=True, children=[ [_('Return to site'), '/'], #[_('Change password'), # reverse('%s:password_change' % site_name)], #[_('Log out'), reverse('%s:logout' % site_name)], ])) # append an app list module for "Applications" self.children.append( modules.AppList( _('Applications'), exclude=('django.contrib.*', ), )) # append an app list module for "Administration" self.children.append( modules.AppList( _('Administration'), models=('django.contrib.*', ), )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5)) # append another link list module for "support". self.children.append( modules.LinkList(_('Support'), children=[ { 'title': _('Helpline documentation'), 'url': 'http://docs.helpline.co.ke/', 'external': True, }, ]))
def init_with_context(self, context): site_name = get_admin_site_name(context) self.children += [ modules.ModelList( u'Portal', models=('raizcidadanista.cms.models.Section', 'raizcidadanista.cms.models.Article', 'raizcidadanista.cms.models.ArticleComment', 'raizcidadanista.cms.models.Menu', 'raizcidadanista.cms.models.URLMigrate', 'raizcidadanista.cms.models.FileDownload', ), ), modules.ModelList( u'Cadastro', models=('cadastro.models.*', ), exclude=('cadastro.models.ListaCadastro', ), ), modules.ModelList( u'Municípios', [ 'municipios.models.*', ] ), modules.ModelList( u'Fórum', [ 'forum.models.*', ] ), modules.ModelList( u'Financeiro', [ 'financeiro.models.*', ] ), modules.ModelList( u'Configurações', models=('raizcidadanista.cms.models.Recurso', 'raizcidadanista.cms.models.Theme', ), extra=[ {'title': u'Visualizador de Arquivos', 'add_url': reverse('filebrowser:fb_upload'), 'change_url': reverse('filebrowser:fb_browse')}, ] ), modules.ModelList( u'Administração', models=('django.contrib.*', 'utils.models.*', 'raizcidadanista.cms.models.EmailAgendado', ), exclude=('django.contrib.sites.models.*', ), ), modules.LinkList( u'Links Rápidos', layout='inline', draggable=True, deletable=True, collapsible=True, children=[ [u'Portal', '/'], [u'Sugerir Artigo', reverse('admin:cms_article_add_power')], [u'Alterar Senha', reverse('admin:password_change')], [u'Reset Menu', reverse('admin:reset_dashboard')], [u'Sair', reverse('admin:logout')], ] ), modules.RecentActions(u'Últimas mudanças', 5), ]
def __init__(self, **kwargs): Dashboard.__init__(self, **kwargs) # append a link list module for "quick links" self.children.append( modules.LinkList(title=_('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ { 'title': _('Return to site'), 'url': '/', }, { 'title': _('Change password'), 'url': reverse('admin:password_change'), }, { 'title': _('Log out'), 'url': reverse('admin:logout') }, ])) # append an app list module for "Applications" self.children.append( modules.AppList( title=_('Applications'), exclude_list=('django.contrib', ), )) # append an app list module for "Administration" self.children.append( modules.AppList( title=_('Administration'), include_list=('django.contrib', ), )) # # append a recent actions module # self.children.append(RecentActionsDashboardModule( # title=_('Recent Actions'), # limit=5 # )) # # # append a feed module # self.children.append(FeedDashboardModule( # title=_('Latest Web Development Activities'), # feed_url='http://www.pivotaltracker.com/user_activities/de98454d195bc113ba489ff01ae2673a', # limit=5 # )) self.children.extend(get_memcache_dash_modules()) self.children.extend(get_varnish_dash_modules()) self.children.extend(get_rss_dash_modules())
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [_('Return to site'), '/'], [_('Documentation'), settings.API_DOCS_URL], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ])) self.children.append( modules.ModelList(title=_('Autenticación'), models=[ 'rest_framework.authtoken.*', 'oauth2_provider.*', 'auths.models.*', 'apps.credentials.models.PlatformApp', ])) self.children.append( modules.ModelList(title=_('Redes Sociales'), models=[ 'social.apps.django_app.*', 'allauth.socialaccount.*', ])) self.children.append( modules.ModelList(title=_('Plataforma'), models=[ 'django.contrib.sites.*', 'constance.*', ])) self.children.append( modules.ModelList(title=_('Administration'), models=[ 'django.contrib.auth.*', 'allauth.account.*', 'apps.users.models.*', ])) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5))
def init_with_context(self, context): site_name = get_admin_site_name(context) self.children.append( modules.ModelList(title=_('Usuários e grupos'), models=[ 'django.contrib.auth.*', 'accounts.models.*', ])) self.children.append( modules.ModelList(title=_('Frontend'), models=[ 'django.contrib.sites.*', 'django.contrib.flatpages.*' ])) self.children.append( modules.ModelList(title=_('Gerenciamento de Eventos'), models=[ 'events.models.*', ])) # self.children.append(modules.ModelList( # title=_('Efa Produtos'), # models=['accounts.models.*',] # )) # self.children.append(modules.ModelList( # title=_('Serviços no App'), # models=['efaservices.models.*',] # )) self.children.append( modules.LinkList(_('Support'), draggable=True, deletable=True, collapsible=True, children=[{ 'title': _('Página do desenvolvedor'), 'url': 'https://www.linkedin.com/in/lauro-cesar/', 'external': True, 'attrs': { 'target': '_blank' }, }, { 'title': _('*****@*****.**'), 'url': 'mailto://[email protected]', 'external': True, 'attrs': { 'target': '_blank' }, }]))
def init_with_context(self, context): self.children.append( modules.ModelList( title=_("Users and groups"), models=[ "django.contrib.auth.*", "accounts.models.*", ], )) self.children.append( modules.ModelList( title=_("Task Manager"), models=["django_celery_beat.models.*"], )) self.children.append( modules.ModelList(title=_("File manager"), models=["filer.*"])) self.children.append( modules.ModelList( title=_("Frontend"), models=[ "django.contrib.sites.*", "django.contrib.flatpages.*" ], )) self.children.append( modules.LinkList( _("Support"), draggable=True, deletable=True, collapsible=True, children=[ { "title": _("Página do desenvolvedor"), "url": "https://www.linkedin.com/in/lauro-cesar/", "external": True, "attrs": { "target": "_blank" }, }, { "title": _("*****@*****.**"), "url": "mailto://[email protected]", "external": True, "attrs": { "target": "_blank" }, }, ], ))
def init_with_context(self, context): for app_name, commands in settings.ADMIN_TOOLS_COMMANDS.items(): children = [] for command in commands: instance = get_command_instance(app_name, command) children.append({'title': mark_safe(instance.name if instance.name else command), 'url': reverse("admintool_command:command", kwargs={"app_name": app_name, "command": command}) }) self.children.append(modules.LinkList(title=app_name, draggable=False, children=children))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [u'Настройки сайта', '/settings/MyApp'], [_('Return to site'), '/'], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ])) self.children.append( modules.ModelList( title=u'Страницы и Контент', models=( 'pages.models.Page', 'slideshow.models.Slider', 'news.models.NewsItem', ), )) self.children.append( modules.ModelList( title=u'Заявки', models=( 'staffform.models.Staff', 'resumeform.models.Resume', ), )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5)) self.children.append( modules.ModelList( title=u'Пользователи', models=( 'django.contrib.auth.*', 'users.models.Profile', ), ))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append an app list module for "Applications" self.children.append( modules.AppList( _('Applications'), exclude=('django.contrib.*', ), )) # append a link list module for "filebrowser" self.children.append( modules.LinkList( _('FileBrowser'), children=[ [_('FileBrowser'), '/admin/filebrowser/browse/'], ])) from configuration.views import ConfigModule self.children.append(ConfigModule()) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5)) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', children=[ [_('Return to site'), '/'], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ]))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Kom igång!'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [ _('Lägg till ett område'), reverse("admin:django_api_area_add") ], [ _('Ändra ett redan tillagt område'), reverse("admin:django_api_area_changelist") ], ])) self.children.append( modules.LinkList( _('Övrigt'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [_('Return to site'), '/'], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ]))
def init_with_context(self, context): site_name = get_admin_site_name(context) # append a link list module for "quick links" self.children.append( modules.LinkList( _('Quick links'), layout='inline', draggable=False, deletable=False, collapsible=False, children=[ [_('Return to site'), '/'], [ _('Change password'), reverse('%s:password_change' % site_name) ], [_('Log out'), reverse('%s:logout' % site_name)], ])) self.children.append( modules.ModelList( _('Asset Manager'), ( 'asset_manager.models.Asset', 'asset_manager.models.Exchange', ), )) self.children.append( modules.ModelList( _('License Manager'), ( 'license_manager.models.License', 'license_manager.models.LicenseAssignment', ), )) # append an app list module for "Administration" self.children.append( modules.AppList( _('Administration'), models=( 'django.contrib.*', 'filer.*', ), )) # append a recent actions module self.children.append(modules.RecentActions(_('Recent Actions'), 5))