コード例 #1
0
 def get_rss_modules(self):
     """
     Instantiate the RSS modules for use in the dashboard.
     This module displays the RSS feeds of the :ref:`dashboardmods` package, if it is installed, and configured.
     """
     if not 'dashboardmods' in settings.INSTALLED_APPS:
         return []
     import dashboardmods
     return dashboardmods.get_rss_dash_modules()
コード例 #2
0
 def get_rss_modules(self):
     """
     Instantiate the RSS modules for use in the dashboard.
     This module displays the RSS feeds of the :ref:`dashboardmods` package, if it is installed, and configured.
     """
     if not 'dashboardmods' in settings.INSTALLED_APPS:
         return []
     import dashboardmods
     return dashboardmods.get_rss_dash_modules()
コード例 #3
0
ファイル: dashboard.py プロジェクト: russel1237/dashboardmods
    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())
コード例 #4
0
ファイル: dashboard.py プロジェクト: Fandekasp/dashboardmods
    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())
コード例 #5
0
ファイル: dashboard.py プロジェクト: cmszing/CMS
    def __init__(self, **kwargs):
        Dashboard.__init__(self, **kwargs)
#        display="tabs",
        self.columns = ADMIN_TOOLS_INDEX_DASHBOARD_COLUMNS
        self.children.append(modules.Group(
            title="",
            display="tabs",
            children=[
                
                modules.AppList(
                    title='Requirements',
                    include_list=('requirements', 'requirement_processing',)
                ),

                modules.AppList(
                    title='Data Management',
                    include_list=('client', 'candidate', 'job.data_management',)
                ),

                modules.AppList(
                    title='Portal Administration',
                    include_list=('django.contrib.sites', 'dashboardmods', 'portal',)
                ),
                
                modules.AppList(
                    title='User Management',
                    include_list=('django.contrib.auth',)
                ),
                
                modules.AppList(
                    title='All Applications',
                    exclude_list=('django.contrib', )
                )
                
            ]
        ))

        

#        # 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(modules.RecentActions(
            title=_('Recent Actions'),
            limit=5
        ))

#        # append a feed module
#        self.children.append(modules.Feed(
#            title=_('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(
#            title=_('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,
#                },
#            ]
#        ))
        # append another link list module for "support".
        
        news_db_list = News.objects.filter(expires_at__gte = datetime.today(), enabled = True )
        
        news_list = []
        
        for news in news_db_list:
            news_dict = {
                         'title' : news.title,
                         'url' : news.url,
                         'external' : True,
                         }
            news_list.append(news_dict)
        
        self.children.append(modules.LinkList(
            title=_('Latest News'),
            children = news_list 
        ))
        
                # append a link list module for "quick links"
#        self.children.append(modules.LinkList(
#            title=_('Quick links'),
#            layout='inline',
#            draggable=True,
#            deletable=True,
#            collapsible=True,
#            children=[
#                {
#                    'title': _('Return to site'),
#                    'url': '/',
#                },
#                {
#                    'title': _('Change password'),
#                    'url': reverse('admin:password_change'),
#                },
#                {
#                    'title': _('Log out'),
#                    'url': reverse('admin:logout')
#                },
#            ]
#        ))
        self.children.extend(get_memcache_dash_modules())
        self.children.extend(get_varnish_dash_modules())
        self.children.extend(get_rss_dash_modules())