Beispiel #1
0
    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,
                },
            ]
        ))
Beispiel #2
0
    def __init__(self, **kwargs):
        Dashboard.__init__(self, **kwargs)
        self.children.append(
            modules.AppList(
                title=_('Applications'),
                exclude=('django.contrib.*', ),
            ))

        # append an app list module for "Administration"
        self.children.append(
            modules.AppList(
                title=_('Administration'),
                models=('django.contrib.*', ),
            ))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(title=_('Recent Actions'), limit=5))
        self.children.append(
            modules.RecentActions(title='Django CMS recent actions',
                                  include_list=(
                                      'cms.page',
                                      'cms.cmsplugin',
                                  )))
        self.children.append(
            modules.Feed(title=_('Latest Django News'),
                         feed_url='http://www.djangoproject.com/rss/weblog/',
                         limit=5))
Beispiel #3
0
 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))
Beispiel #4
0
    def __init__(self, **kwargs):
        Dashboard.__init__(self, **kwargs)

        # will only list the django.contrib apps
        self.children.append(
            modules.Feed(title=_('Latest Django News'),
                         feed_url='http://www.djangoproject.com/rss/weblog/',
                         limit=5))
Beispiel #5
0
    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(
                _('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 an app list module
        self.children.append(
            modules.AppList(
                _('Dashboard Stats Settings'),
                models=('admin_tools_stats.*', ),
            ))

        # Copy following code into your custom dashboard
        # append following code after recent actions module or
        # a link list module for "quick links"
        graph_list = get_active_graph()
        for i in graph_list:
            kwargs = {}
            kwargs['require_chart_jscss'] = True
            kwargs['graph_key'] = i.graph_key

            if context['request'].POST.get('select_box_' + i.graph_key):
                kwargs['select_box_' +
                       i.graph_key] = context['request'].POST['select_box_' +
                                                              i.graph_key]

            self.children.append(DashboardCharts(**kwargs))

        # 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,
                    },
                ]))
Beispiel #7
0
    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)

        #self.children.append(
        #            HistoryDashboardModule()
        #)

        self.children.append(modules.Group(
            title="General",
            display="tabs",
            children=[
                modules.AppList(
                    title='User',
                    models=('django.contrib.*', 'user_profile.*'),
                ),
                modules.AppList(
                    _('Task Manager'),
                    models=('djcelery.*', ),
                ),
                modules.AppList(
                    _('Dashboard Stats'),
                    models=('admin_tools_stats.*', ),
                ),
                modules.RecentActions(_('Recent Actions'), 5),
            ]
        ))

        self.children.append(modules.AppList(
            _('CDR Voip'),
            models=('cdr.*',),
        ))

        self.children.append(modules.AppList(
            _('Alert'),
            models=('cdr_alert.*', ),
        ))

        self.children.append(modules.AppList(
            _('Country Dialcode'),
            models=('country_dialcode.*', ),
        ))

        # append a link list module for "quick links"
        self.children.append(modules.LinkList(
            _('Quick links'),
            layout='inline',
            draggable=True,
            deletable=True,
            collapsible=True,
            children=[
                [_('Go to CDR-Stats.org'), 'http://www.cdr-stats.org/'],
                [_('Change password'),
                 reverse('%s:password_change' % site_name)],
                [_('Log out'), reverse('%s:logout' % site_name)],
            ]
        ))

        # append a feed module
        self.children.append(modules.Feed(
            _('Latest CDR-Stats News'),
            feed_url='http://www.cdr-stats.org/category/blog/feed/',
            limit=5
        ))
Beispiel #8
0
    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=('django.contrib*', 'piston*', 'djcelery*',
                         'actstream*'),
            ))

        # append an app list module for "Administration"
        self.children.append(
            modules.AppList(
                title="Administration",
                models=('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="Teerace development news",
                feed_url=
                'https://github.com/chaosk/teerace/commits/master.atom',
                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': "Teerace GitHub issues",
                        'url': 'https://github.com/chaosk/teerace/issues',
                        'external': True,
                    },
                    {
                        'title': "Teerace irc channel",
                        'url': 'irc://irc.quakenet.org/teerace',
                        'external': True,
                    },
                ]))
Beispiel #9
0
 def get_children(self, context):
     site_name = get_admin_site_name(context)
     children = [
         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)],
             ]),
         modules.AppList(
             title=_('Applications'),
             exclude=('django.contrib.*', ),
         ),
         modules.AppList(
             title=_('Administration'),
             models=('django.contrib.*', ),
         ),
         modules.Feed(
             # _('Latest Django News'),
             _('Latest Reddit News'),
             # feed_url='http://www.djangoproject.com/rss/weblog/',
             feed_url='https://www.reddit.com/r/worldnews/.rss',
             limit=5),
         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,
                 },
             ]),
         modules.ModelList(
             title=u'Пользователи',
             models=(
                 'django.contrib.auth.*',
                 'my_accounts.models.Profile',
             ),
         ),
         modules.Group(
             title=u"Статистика",
             display="tabs",
             children=[
                 MyModule(),
                 # nadovmeste_modules.Overview(),
                 # nadovmeste_modules.Subscribers(),
                 # nadovmeste_modules.Finances(),
                 # nadovmeste_modules.Users(),
             ]),
         MyModule(
             title=u"Приветствие",
             message=u'Привет!',
             babesage='goodbye',
         ),
         modules.RecentActions(title=_('Recent Actions'), limit=5),
         # HistoryDashboardModule(),
         HistoryDashboardModule(
             enabled=True,
             draggable=True,
             collapsible=True,
             deletable=True,
             title='Історія',
             title_url=None,
             css_classes=None,
             pre_content=None,
             post_content=None,
             content=None,
             # template="admin_tools/dashboard/module.html"
         ),
         modules.Group(
             title="My Group",
             display="tabs",
             # display="accordion",
             # display="stacked",
             children=[
                 modules.AppList(title="Shop",
                                 models=[
                                     'sw_shop.sw_catalog.models.Item',
                                 ]),
                 modules.AppList(title="Apps", exclude=[
                     'box.*',
                 ]),
             ]),
         modules.LinkList(
             # layout='inline',
             layout='stacked',
             children=(
                 {
                     'title': 'Python website',
                     'url': 'http://www.python.org',
                     'external': True,
                     'description': 'Python language rocks !',
                     'attrs': {
                         'target': '_blank'
                     },
                 },
                 ['Django', 'http://www.djangoproject.com', True],
                 ['Some internal link', '/some/internal/link/'],
             )),
         modules.AppList(title='Administration',
                         models=('django.contrib.*', )),
         modules.AppList(title='Applications',
                         exclude=('django.contrib.*', )),
         modules.ModelList(title='Authentication',
                           models=[
                               'django.contrib.auth.*',
                           ]),
         modules.RecentActions(title='Django CMS recent actions',
                               include_list=(
                                   'box.page',
                                   'sw_admin',
                               )),
     ]
     return children
Beispiel #10
0
    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'), '/'],
                    [_('Content Portal (CMS)'), '/cms/'],
                    [
                        _('Change password'),
                        reverse('%s:password_change' % site_name)
                    ],
                    [_('Log out'),
                     reverse('%s:logout' % site_name)],
                ]))

        self.children.append(
            modules.Group(title="Core",
                          display="tabs",
                          children=[
                              modules.AppList(title='Context',
                                              models=(
                                                  'metavision.core.*',
                                                  'django_context.*',
                                                  'invitations.*',
                                                  'django_proximity_roles.*',
                                              )),
                              modules.AppList(
                                  title='Performances',
                                  models=('the_voice.performances.*', )),
                          ]))

        # append a recent actions module
        self.children.append(modules.RecentActions(_('Recent Actions'), 12))

        # append a feed module
        self.children.append(
            modules.Feed(
                _('Latest Django News'),
                feed_url='http://www.djangoproject.com/rss/weblog/',
                limit=5,
            ))

        self.children.append(
            modules.Group(title="Accounts",
                          display="tabs",
                          children=[
                              modules.AppList(title='Users',
                                              models=(
                                                  'the_voice.users.*',
                                                  'django_proximity_roles.*',
                                              )),
                              modules.AppList(title='Accounts',
                                              models=('accounts.*', )),
                              modules.AppList(title='Authentication',
                                              models=(
                                                  'allauth.*',
                                                  'rest_framework.*',
                                              )),
                          ]))

        self.children.append(
            modules.Group(
                title="Administration",
                display="tabs",
                children=[
                    # modules.AppList(
                    #     title='Ticket Tracker',
                    #     models=(
                    #         'the_voice.tracker.*',
                    #     )
                    # ),
                    modules.AppList(title='Administration',
                                    models=('django.contrib.*', )),
                    modules.AppList(title='Users',
                                    models=(
                                        'the_voice.users.*',
                                        'django_proximity_roles.*',
                                    )),
                    modules.AppList(
                        title='Sites',
                        models=('django.contrib.sites.models.Site', ))
                ]))

        self.children.append(
            modules.Group(
                title="Scheduled Tasks",
                display="tabs",
                children=[
                    modules.AppList(title='Scheduled Tasks',
                                    models=('django_celery_beat.*', )),
                    modules.AppList(title='Task Results',
                                    models=('django_celery_results.*', ))
                ]))

        # 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,
                    },
                ]))
Beispiel #11
0
    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.Group(
                deletable=False,
                title=u"Модели",
                display="tabs",
                children=[
                    modules.ModelList(title='Модели',
                                      models=(
                                          'main.models.Model',
                                          'main.models.ModelRecall',
                                      )),
                    modules.ModelList(title='Параметры',
                                      models=(
                                          'main.models.Sex',
                                          'main.models.Race',
                                          'main.models.HairColor',
                                          'main.models.BustSize',
                                          'main.models.Figure',
                                          'main.models.SpeaksLanguage',
                                          'main.models.PublicArea',
                                          'main.models.Extra',
                                      )),
                    modules.ModelList(title='Снимки камер',
                                      models=('main.models.CamSnapshot', )),
                ]))

        self.children.append(
            modules.ModelList(deletable=False,
                              title=u"Кам Сервисы",
                              models=[
                                  'main.models.CamService',
                              ]))

        # append an app list module for "Applications"
        # self.children.append(modules.AppList(
        #     _('Applications'),
        #     exclude=('main.models.User','django.contrib.*',),
        # ))

        # append an app list module for "Administration"
        self.children.append(
            modules.AppList(
                _('Administration'),
                app_title='qwe',
                models=('main.models.User', ),
            ))

        # 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,
                    },
                ]))
Beispiel #12
0
    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(
            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,
                    },
                ]))
Beispiel #13
0
    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(title=u'Пользователи',
                              models=(
                                  'accounts.models.*',
                                  'django.contrib.auth.models.Group',
                              )))

        self.children.append(
            modules.Group(
                title=u"Настройки доступа на сайт",
                display="tabs",
                children=[
                    modules.ModelList(
                        title=u'Сайт',
                        models=('django.contrib.sites.models.*', )),
                    modules.ModelList(
                        title=u"Приглашения",
                        models=('invitations.models.Invitations', )),
                    modules.ModelList(
                        title=u"Регистрация по email",
                        models=(
                            'allauth.account.models.EmailAddress',
                            'allauth.account.models.EmailConfirmation',
                        )),
                    modules.ModelList(
                        title=u"Социальные сети",
                        models=('allauth.socialaccount.models.*', )),
                ]))

        self.children.append(
            modules.Group(title=u"Добрые новости",
                          display="tabs",
                          children=[
                              modules.ModelList(title=u'Обычные новости',
                                                models=('facts.models.*', )),
                              modules.ModelList(title=u"Списки элементов",
                                                models=(
                                                    'ideas.models.Category',
                                                    'ideas.models.Tags',
                                                )),
                          ]))

        # 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': u'Документация на русском по Django',
                        'url': 'http://djbook.ru',
                        'external': True,
                    },
                    {
                        'title': _('Django documentation'),
                        'url': 'http://docs.djangoproject.com/',
                        'external': True,
                    },
                    {
                        'title': u'Документация по Django-allauth',
                        'url':
                        'http://django-allauth.readthedocs.org/en/latest/overview.html',
                        'external': True,
                    },
                ]))
    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)

        #self.children.append(
        #            HistoryDashboardModule()
        #)

        self.children.append(
            modules.Group(title="General",
                          display="tabs",
                          children=[
                              modules.AppList(
                                  title='User',
                                  models=(
                                      'django.contrib.*',
                                      'user_profile.*',
                                  ),
                              ),
                              modules.AppList(
                                  _('Task Manager'),
                                  models=('djcelery.*', ),
                              ),
                              modules.AppList(
                                  _('Dashboard Stats'),
                                  models=('admin_tools_stats.*', ),
                              ),
                              modules.RecentActions(_('Recent Actions'), 5),
                          ]))

        self.children.append(
            modules.AppList(
                _('Settings'),
                models=('dialer_settings.*', ),
            ))

        # append an app list module for "Dialer"
        self.children.append(
            modules.AppList(
                _('Voip Dialer'),
                models=(
                    'dialer_cdr.*',
                    'dialer_gateway.*',
                    'dialer_campaign.*',
                ),
            ))

        # append an app list module for "Dialer"
        self.children.append(
            modules.AppList(
                _('Voip Server'),
                models=('voice_app.*', ),
            ))

        # append an app list module for "Dialer"
        self.children.append(
            modules.AppList(
                _('Audio Files'),
                models=('audiofield.*', ),
            ))

        # append an app list module for "Country_prefix"
        self.children.append(
            modules.AppList(
                _('Survey'),
                models=('survey.*', ),
            ))

        # append a link list module for "quick links"
        """
        #Quick link seems to broke the admin design if too many element
        self.children.append(modules.LinkList(
            _('Quick links'),
            layout='inline',
            draggable=True,
            deletable=True,
            collapsible=True,
            children=[
                [_('Go to Newfies-Dialer'), 'http://www.newfies-dialer.org/'],
                [_('Change password'),
                 reverse('%s:password_change' % site_name)],
                [_('Log out'), reverse('%s:logout' % site_name)],
            ],
        ))
        """

        if not settings.DEBUG:
            # append a feed module
            self.children.append(
                modules.Feed(
                    _('Latest Newfies-Dialer News'),
                    feed_url=
                    'http://www.newfies-dialer.org/category/blog/feed/',
                    limit=5))

        # append an app list module for "Country_prefix"
        self.children.append(
            modules.AppList(
                _('Dashboard Stats Settings'),
                models=('admin_dashboard_stats.*', ),
            ))

        # Copy following code into your custom dashboard
        graph_list = get_active_graph()
        for i in graph_list:
            kwargs = {}
            kwargs['chart_size'] = "360x100"
            kwargs['graph_key'] = i.graph_key
            if request.POST.get('select_box_' + i.graph_key):
                kwargs['select_box_' +
                       i.graph_key] = request.POST['select_box_' + i.graph_key]

            self.children.append(DashboardCharts(**kwargs))
Beispiel #15
0
    def init_with_context(self, context):
        # we want a 3 columns layout
        self.columns = 3
        site_name = get_admin_site_name(context)

        # self.children.append(
        #            HistoryDashboardModule()
        # )

        self.children.append(
            modules.Group(title="General",
                          display="tabs",
                          children=[
                              modules.AppList(
                                  title=_('user').capitalize(),
                                  models=('django.contrib.*',
                                          'user_profile.*'),
                              ),
                              modules.AppList(
                                  _('task manager').title(),
                                  models=('djcelery.*', ),
                              ),
                              modules.AppList(
                                  _('dashboard stats').title(),
                                  models=('admin_tools_stats.*', ),
                              ),
                              modules.RecentActions(_('Recent Actions'), 5),
                          ]))

        self.children.append(
            modules.AppList(
                _('CDR Voip'),
                models=('cdr.*', ),
            ))

        self.children.append(
            modules.AppList(
                _('alert').title(),
                models=('cdr_alert.*', ),
            ))

        self.children.append(
            modules.AppList(
                _('country dialcode').title(),
                models=('country_dialcode.*', ),
            ))

        self.children.append(
            modules.AppList(
                _('Voip gateway').title(),
                models=('voip_gateway.*', ),
            ))

        self.children.append(
            modules.AppList(
                _('Voip billing').title(),
                models=('voip_billing.*', ),
            ))

        self.children.append(
            modules.AppList(
                _('Switch').title(),
                models=('switch.*', ),
            ))

        # append a link list module for "quick links"
        self.children.append(
            modules.LinkList(
                _('quick links').capitalize(),
                layout='inline',
                draggable=True,
                deletable=True,
                collapsible=True,
                children=[
                    [_('Go to CDR-Stats.org'), 'http://www.cdr-stats.org/'],
                    [
                        _('change password').capitalize(),
                        reverse('%s:password_change' % site_name)
                    ],
                    [
                        _('log out').capitalize(),
                        reverse('%s:logout' % site_name)
                    ],
                ]))

        if not settings.DEBUG:
            # append a feed module
            self.children.append(
                modules.Feed(
                    _('Latest CDR-Stats News'),
                    feed_url='http://www.cdr-stats.org/category/blog/feed/',
                    limit=5))
Beispiel #16
0
    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))

        self.children.append(
            modules.LinkList(_('Admin Tasks'),
                             children=[
                                 {
                                     'title':
                                     _('Admin Task A'),
                                     'url':
                                     reverse('app_name:run-task',
                                             kwargs={'task': 'task-a'}),
                                 },
                                 {
                                     'title':
                                     _('Admin Task B'),
                                     'url':
                                     reverse('app_name:run-task',
                                             kwargs={'task': 'task-b'}),
                                 },
                             ]))
Beispiel #17
0
    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,
                collapsible=True,
                draggable=True,
                deletable=True,
                children=[
                    [_('Return to site'), '/'],
                    [
                        _('Change password'),
                        reverse('%s:password_change' % site_name)
                    ],
                    [_('Log out'),
                     reverse('%s:logout' % site_name)],
                ]))

        for c in context:
            if 'user' in c:
                user = c['user']
                break

        if 'open_platform' in user.account:
            self.children.append(
                modules.ModelList(
                    # title=u'Order - models..나..',
                    _(u'주문 메뉴'),
                    models=[
                        'libs.submodels.order.*',
                    ],
                ))

        else:
            '''
            # append an app list module for "Applications"
            self.children.append(modules.AppList(
                _('Applications'),
                exclude=('django.contrib.*', 'libs.submodels.product.*', ),
            ))
            '''
            self.children.append(
                modules.ModelList(
                    # title=u'Order - models..나..',
                    _(u'주문 메뉴'),
                    models=[
                        'libs.submodels.order.Order',
                        'libs.submodels.order.OrderItem',
                        'libs.submodels.order.OrderItemForDelivery',
                        'libs.submodels.order.DeliveryPauseDate',
                    ],
                ))

            self.children.append(
                modules.ModelList(
                    # title=u'Order - models..나..',
                    _(u'네이버페이 관리 메뉴'),
                    models=[
                        'libs.submodels.npay_order.NpayRecallRequest',
                        'libs.submodels.npay_order.NpayCancelRequest',
                        'libs.submodels.npay_order.NpayExchangeRequest',
                    ],
                ))

            self.children.append(
                modules.ModelList(
                    _(u'상품 메뉴'),
                    models=[
                        'libs.submodels.product.*',
                    ],
                    exclude=[
                        'libs.submodels.product.ProductDetail',
                        'libs.submodels.product.ProductOptionGroup',
                        'libs.submodels.product.ProductOption',
                    ],
                ))

            self.children.append(
                modules.ModelList(
                    _(u'회원 메뉴'),
                    models=[
                        'libs.submodels.member.*',
                    ],
                    exclude=[
                        'libs.submodels.member.MemberPoint',
                        'libs.submodels.member.MemberBoard',
                    ],
                ))

            self.children.append(
                modules.ModelList(
                    _(u'회원 Point'),
                    models=[
                        'libs.submodels.member_point.*',
                    ],
                ))

            self.children.append(
                modules.ModelList(
                    _(u'프로모션'),
                    models=[
                        'libs.submodels.promotion.*',
                    ],
                ))

            self.children.append(
                modules.ModelList(
                    _(u'샵 관리'),
                    models=[
                        'libs.submodels.shop.*',
                    ],
                ))

            self.children.append(
                modules.ModelList(
                    _(u'게시판'),
                    models=[
                        'libs.submodels.board.*',
                    ],
                    exclude=[
                        'libs.submodels.board.Comment',
                    ],
                ))

            self.children.append(
                modules.ModelList(
                    _(u'결제'),
                    models=[
                        'libs.submodels.payment.*',
                    ],
                ))

            # 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,
                        },
                    ]))

            self.children.append(
                modules.ModelList(
                    _('통계'),
                    models=[
                        'libs.submodels.order.PaymentStats',
                    ],
                ))

            self.children.append(
                modules.ModelList(
                    _('배치작업'),
                    models=[
                        'libs.submodels.batch.Batch',
                    ],
                ))
Beispiel #18
0
    def init_with_context(self, context):

        request = context['request']

        # we want a 3 columns layout
        self.columns = 3

        self.children.append(
            modules.Group(title=_("General"),
                          display="tabs",
                          children=[
                              modules.AppList(
                                  title=_('User'),
                                  models=(
                                      'django.contrib.*',
                                      'user_profile.*',
                                      'agent.*',
                                  ),
                              ),
                              modules.AppList(
                                  _('Task Manager'),
                                  models=('djcelery.*', ),
                              ),
                              modules.AppList(
                                  _('Dashboard stats'),
                                  models=('admin_tools_stats.*', ),
                              ),
                              modules.RecentActions(_('Recent Actions'), 5),
                          ]))

        self.children.append(
            modules.AppList(
                _('Callcenter'),
                models=('callcenter.*', ),
            ))

        self.children.append(
            modules.AppList(
                _('Settings'),
                models=('dialer_settings.*', ),
            ))

        # append an app list module for "Dialer"
        self.children.append(
            modules.AppList(
                _('VoIP dialer'),
                models=(
                    'dialer_cdr.*',
                    'dialer_gateway.*',
                    'dialer_contact.*',
                    'dialer_campaign.*',
                ),
            ))

        # append an app list module for "Dialer"
        self.children.append(
            modules.AppList(
                _('Surveys'),
                models=('survey.*', ),
            ))

        self.children.append(
            modules.AppList(
                _('SMS Gateway'),
                models=('sms.*', ),
            ))

        # append an app list module for "SMS"
        self.children.append(
            modules.AppList(
                _('SMS module'),
                models=('mod_sms.*', ),
            ))

        # append an app list module for "Dialer"
        self.children.append(
            modules.AppList(
                _('Audio Files'),
                models=('audiofield.*', ),
            ))

        self.children.append(
            modules.AppList(
                _('Do Not Call'),
                models=('dnc.*', ),
            ))

        self.children.append(
            modules.AppList(
                _('Appointment'),
                models=('appointment.*', ),
            ))

        self.children.append(
            modules.AppList(
                _('Mod Mailer'),
                models=('mod_mailer.*', ),
            ))

        self.children.append(
            modules.AppList(
                _('Calendar Settings'),
                models=('calendar_settings.*', ),
            ))

        self.children.append(
            modules.LinkList(
                _('Reporting'),
                draggable=True,
                deletable=True,
                collapsible=True,
                children=[
                    [
                        _('Call Daily Report'),
                        reverse('admin:dialer_cdr_voipcall_changelist') +
                        'voip_daily_report/'
                    ],
                ],
            ))

        # append a link list module for "quick links"
        # site_name = get_admin_site_name(context)

        # Quick link seems to broke the admin design if too many element
        self.children.append(
            modules.LinkList(
                _('Quick links'),
                layout='inline',
                draggable=True,
                deletable=True,
                collapsible=True,
                children=[
                    [
                        _('Newfies-Dialer Website'),
                        'http://www.newfies-dialer.org/'
                    ],
                    [
                        _('Support'),
                        'http://www.newfies-dialer.org/about-us/contact/'
                    ],
                    [_('Add-ons'), 'http://www.newfies-dialer.org/add-ons/'],
                    # [_('Change password'), reverse('%s:password_change' % site_name)],
                    # [_('Log out'), reverse('%s:logout' % site_name)],
                ],
            ))

        if not settings.DEBUG:
            # append a feed module
            self.children.append(
                modules.Feed(
                    _('Latest Newfies-Dialer News'),
                    feed_url=
                    'http://www.newfies-dialer.org/category/blog/feed/',
                    limit=5))

        # append an app list module for "Country_prefix"
        self.children.append(
            modules.AppList(
                _('Dashboard Stats Settings'),
                models=('admin_dashboard_stats.*', ),
            ))

        # Copy following code into your custom dashboard
        graph_list = get_active_graph()
        for i in graph_list:
            kwargs = {}
            kwargs['require_chart_jscss'] = False
            kwargs['graph_key'] = i.graph_key
            if request.POST.get('select_box_' + i.graph_key):
                kwargs['select_box_' +
                       i.graph_key] = request.POST['select_box_' + i.graph_key]

            self.children.append(DashboardCharts(**kwargs))
Beispiel #19
0
    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,
        #    css_classes=['column_1'],
        #    children=[
        #        {
        #            'title': _('Return to site'),
        #            'url': '/',
        #        },
        #        {
        #            'title': _('Change password'),
        #            'url': reverse('admin:password_change'),
        #        },
        #        {
        #            'title': _('Log out'),
        #            'url': reverse('admin:logout')
        #        },
        #    ]
        #))

        try:
            # add link to filebrowser
            self.children.append(
                modules.LinkList(title=_('Media Management'),
                                 css_classes=['column_1'],
                                 children=[
                                     {
                                         'title': _('Django FileBrowser'),
                                         'url': reverse("fb_browse"),
                                         'external': False,
                                     },
                                 ]))
        except NoReverseMatch:
            # seems like reverse("fb_browse") didn't worked
            # => filebrowser not installed
            pass

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                title=_('Applications'),
                css_classes=['column_1'],
                exclude_list=(
                    'django.contrib',
                    'colophon',
                ),
            ))

        # append an app list module for "Administration"
        self.children.append(
            modules.AppList(
                title=_('Administration'),
                css_classes=['column_3'],
                include_list=(
                    'django.contrib',
                    'colophon',
                ),
            ))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(css_classes=['column_2'],
                                  title=_('Recent Actions'),
                                  limit=5))

        # append a feed module
        self.children.append(
            modules.Feed(title=_('Latest Django News'),
                         css_classes=['column_2'],
                         feed_url='http://www.djangoproject.com/rss/weblog/',
                         limit=5))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(
                title=_('Support'),
                css_classes=['column_3'],
                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,
                    },
                ]))