def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        self.children += [
            modules.ModelList(self.app_title, self.models),
            modules.RecentActions(include_list=self.get_app_content_types()),
        ]
Beispiel #2
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # append a model list module and a recent actions module
        self.children += [
            modules.ModelList(self.app_title, self.models)
        ]
Beispiel #3
0
 def test_models(self):
     models = [
         'django.contrib.auth.models.User',
         'django.contrib.auth.models.Group'
     ]
     board = AppIndexDashboard('Auth', models)
     self.assertEqual(board.get_app_model_classes(), [User, Group])
Beispiel #4
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # TODO: Find a better way for this
        if str(self.app_title) == 'Voip_Gateway':
            app_title = _('voip gateway')
            models = ['voip_gateway.*']
        elif str(self.app_title) == 'Voip_Billing':
            app_title = _('Voip Billing')
            models = ['voip_billing.*']
        elif str(self.app_title) == 'Cdr_Alert':
            app_title = _('CDR Alert')
            models = ['cdr_alert.*']
        else:
            app_title = self.app_title
            models = self.models

        # append a model list module and a recent actions module
        self.children += [
            # modules.ModelList(self.app_title, self.models),
            modules.ModelList(app_title, models),
            modules.RecentActions(
                _('recent actions').title(),
                include_list=self.get_app_content_types(),
                limit=5
            )
        ]
Beispiel #5
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        self.children += [
            modules.ModelList(self.app_title, self.models),
            modules.RecentActions(include_list=self.get_app_content_types()),
        ]
Beispiel #6
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # append a model list module and a recent actions module
        self.children += [
            modules.ModelList(self.app_title, self.models),
        ]
Beispiel #7
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # TODO: Find a better way for this
        if str(self.app_title) == 'Voip_Gateway':
            app_title = _('voip gateway')
            models = ['voip_gateway.*']
        elif str(self.app_title) == 'Voip_Billing':
            app_title = _('Voip Billing')
            models = ['voip_billing.*']
        elif str(self.app_title) == 'Cdr_Alert':
            app_title = _('CDR Alert')
            models = ['cdr_alert.*']
        else:
            app_title = self.app_title
            models = self.models

        # append a model list module and a recent actions module
        self.children += [
            # modules.ModelList(self.app_title, self.models),
            modules.ModelList(app_title, models),
            modules.RecentActions(_('recent actions').title(),
                                  include_list=self.get_app_content_types(),
                                  limit=5)
        ]
Beispiel #8
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        self.children.append(
            modules.RecentActions(_('Recent Actions'),
                                  include_list=self.get_app_content_types(),
                                  limit=10))
Beispiel #9
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # append a model list module and a recent actions module
        self.children += [
            modules.ModelList(self.app_title, self.models),
            modules.RecentActions(_("Recent Actions"), include_list=self.get_app_content_types(), limit=5),
        ]
Beispiel #10
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        self.children.append(modules.RecentActions(
                _('Recent Actions'),
                include_list=self.get_app_content_types(),
                limit=10
        ))
Beispiel #11
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # append a model list module and a recent actions module
        self.children += [
            modules.ModelList(self.app_title, self.models),
            modules.RecentActions(_("Recent Actions"), include_list=self.get_app_content_types(), limit=5),
        ]
Beispiel #12
0
    def __init__(self, app_title, models, **kwargs):
        AppIndexDashboard.__init__(self, app_title, models, **kwargs)

        # append a model list module that lists all models
        # for the app and a recent actions module for the current app
        self.children += [
            modules.ModelList(self.app_title, self.models),
            modules.RecentActions(include_list=self.models, limit=5)
        ]
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        if self.app_title == 'App':
            self.children.extend(accounts_models())
        else:
            self.children.append(
                modules.ModelList(
                    self.app_title,
                    self.models))
Beispiel #14
0
 def test_models(self):
     models = [
         "django.contrib.auth.models.User",
         "django.contrib.auth.models.Group",
     ]
     board = AppIndexDashboard("Auth", models)
     self.assertEqual(
         board.get_app_model_classes(),
         [auth_models.User, auth_models.Group],
     )
Beispiel #15
0
 def __init__(self, *args, **kwargs):
     AppIndexDashboard.__init__(self, *args, **kwargs)
     self.children = CustomIndexDashboard().children
     # append a model list module and a recent actions module
     self.children += [
         modules.RecentActions(
             _('Recent Actions'),
             include_list=self.get_app_content_types(),
             limit=10
         )
     ]
Beispiel #16
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # we disable title because its redundant with the model list module
        self.title = ""

        # append a model list module
        self.children.append(modules.ModelList(title=self.app_title, models=self.models))

        # append a recent actions module
        self.children.append(modules.RecentActions(title="Recent Actions", include_list=self.get_app_content_types()))
Beispiel #17
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # append a model list module and a recent actions module
        self.children += [
            modules.ModelList(self.app_title, self.models),
            modules.RecentActions(
                _('Recent Actions (This App)'),
                include_list=self.models,
                limit=20
            )
        ]
Beispiel #18
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # append a model list module and a recent actions module
        self.children += [
            modules.ModelList(self.app_title, self.models, css_classes=['column_1'],),
            modules.RecentActions(
                title=_('Recent Actions'),
                include_list=self.get_app_content_types(),
                limit=5,
                css_classes=['column_2'],
            )
        ]
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # append a model list module and a recent actions module
        if self.app_title==u'Блог':
            self.children += [
                modules.ModelList(self.app_title, ['blog.models.BlogCategory','blog.models.BlogArticle',
                                                   'blog.models.BlogSearching']),
                ]
        if self.app_title == u'Настройки сайта':
            self.children += [
                modules.ModelList(self.app_title, ['site_utils.models.SiteProfile','site_utils.models.SiteMessages',
                                                   'site_utils.models.SitePage']),
            ]
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # append a model list module and a recent actions module
        self.children += [
            modules.ModelList(self.app_title, self.models),
            modules.RecentActions(_('Recent Actions'),
                                  include_list=self.get_app_content_types(),
                                  limit=5)
        ]
        self.children.append(
            modules.Group(title=u"Добавление мест",
                          display="tabs",
                          children=[]))
Beispiel #21
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # append a model list module and a recent actions module
        self.children += [
            modules.ModelList(self.app_title, self.models),
            modules.RecentActions(
                _('Recent Actions'),
                include_list=self.get_app_content_types(),
                limit=5
            )
        ]

        signals.app_index_dashboard.send(sender=ShopAppIndexDashboard, 
            dashboard=self)
Beispiel #22
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # append a model list module and a recent actions module
        self.children += [
            #modules.ModelList(self.app_title, self.models),
            modules.ModelList(
                title='Repository Manager',
                models=('requmgr.models.FeatureGroup',
                        'requmgr.models.Requirement',
                        'testmgr.models.SamlProfile',
                        'testmgr.models.TestPlan',
                        'testmgr.models.Operation',
                        'testmgr.models.TestConfig',
                ),
            )
        ]
Beispiel #23
0
    def __init__(self, app_title, models, **kwargs):
        AppIndexDashboard.__init__(self, app_title, models, **kwargs)

        # append a model list module that lists all models
        # for the app and a recent actions module for the current app
        self.children += [
            # modules.ModelList(self.app_title, self.models),
            modules.RecentActions(
                include_list=self.get_app_content_types(),
                limit=5
            )
        ]
        # append a model list module
        self.children.append(MyDashboardAppList(

            include_list=self.models,
        ))
Beispiel #24
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # append a model list module and a recent actions module
        self.children += [
            modules.ModelList(
                self.app_title,
                self.models,
                exclude=(
                    "django.contrib.*",
                    "fablabadmin.base.models.ContactStatus",
                    "fablabadmin.base.models.ResourceType",
                    "filer*",
                ),
            ),
            RecentActions(_("Recent Actions"), include_list=self.get_app_content_types(), limit=20),
        ]
Beispiel #25
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # we disable title because its redundant with the model list module
        self.title = ''

        # append a model list module
        self.children.append(modules.ModelList(
            title=self.app_title,
            include_list=self.models,
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            title=_('Recent Actions'),
            include_list=self.get_app_content_types(),
        ))
Beispiel #26
0
    def __init__(self, **kwargs):
        AppIndexDashboard.__init__(self, **kwargs)
        # we don't want a title, it's redundant
        self.title = ''

        # append a model list module that lists all models 
        # for the app
        self.children.append(ModelListDashboardModule(
            title=self.app_title,
            include_list=self.models,
        ))

        # append a recent actions module for the current app
        self.children.append(RecentActionsDashboardModule(
            title=_('Recent Actions'),
            include_list=self.models,
            limit=5
        ))
Beispiel #27
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # we disable title because its redundant with the model list module
        self.title = ''
        if self.app_title == 'Auth':
            self.app_title = u'Авторизация и аутентификация'
        # append a model list module
        self.children.append(modules.ModelList(
            title=self.app_title,
            include_list=self.models,
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            title=_('Recent Actions'),
            include_list=self.get_app_content_types(),
        ))
Beispiel #28
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # append a model list module and a recent actions module
        self.children += [
            #modules.ModelList(self.app_title, self.models),
            modules.ModelList(
                title='Repository Manager',
                models=(
                    'requmgr.models.FeatureGroup',
                    'requmgr.models.Requirement',
                    'testmgr.models.SamlProfile',
                    'testmgr.models.TestPlan',
                    'testmgr.models.Operation',
                    'testmgr.models.TestConfig',
                ),
            )
        ]
Beispiel #29
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # we disable title because its redundant with the model list module
        self.title = ''

        # append a model list module
        self.children.append(modules.ModelList(
            title=self.app_title,
            css_classes=['column_1', 'collapse', 'open'],
            models=self.models,
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            title='Recent Actions',
            css_classes=['column_2', 'collapse', 'open'],
            include_list=self.get_app_content_types(),
        ))
Beispiel #30
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)
        self.columns = 2

        # we disable title because its redundant with the model list module
        self.title = ''

        # append a model list module
        self.children.append(modules.ModelList(
            title=self.app_title,
            include_list=self.models,
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            title=_('Recent Actions'),
            include_list=self.get_app_content_types(),
            column=2
        ))
Beispiel #31
0
 def __init__(self, *args, **kwargs):
     AppIndexDashboard.__init__(self, *args, **kwargs)
     if self.app_title == 'Partsrecycle':
         self.children.append(PartsRecycleModule())
     elif self.app_title == 'Authentication and Authorization':
         self.children.append(modules.ModelList(
             title = u'Authentication',
             models = ['django.contrib.auth.*',]
         ))
     else:
         self.children.append(modules.ModelList(self.app_title, self.models))
         
     # append a model list module and a recent actions module
     self.children += [
         modules.RecentActions(
             _('Recent Actions'),
             include_list=self.get_app_content_types(),
             limit=5
         )
     ]
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # we disable title because its redundant with the model list module
        self.title = ''

        # append a model list module
        self.children.append(
            modules.ModelList(
                title=self.app_title,
                css_classes=['column_1', 'collapse', 'open'],
                models=self.models,
            ))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                title='Recent Actions',
                css_classes=['column_2', 'collapse', 'open'],
                include_list=self.get_app_content_types(),
            ))
Beispiel #33
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # TODO: Find out better way
        if str(self.app_title) == 'Dialer_Settings':
            app_title = _('Dialer Settings')
            models = ['dialer_settings.*']
        elif str(self.app_title) == 'Dialer_Campaign':
            app_title = _('Dialer Campaign')
            models = ['dialer_campaign.*']
        elif str(self.app_title) == 'Dialer_Contact':
            app_title = _('Dialer Contact')
            models = ['dialer_contact.*']
        elif str(self.app_title) == 'Dialer_Cdr':
            app_title = _('Dialer CDR')
            models = ['dialer_cdr.*']
        elif str(self.app_title) == 'Dialer_Gateway':
            app_title = _('Dialer Gateway')
            models = ['dialer_gateway.*']
        elif str(self.app_title) == 'Country_Dialcode':
            app_title = _('Country Dialcode')
            models = ['country_dialcode.*']
        elif str(self.app_title) == 'Dnc':
            app_title = _('Do Not Call')
            models = ['dnc.*']
        else:
            app_title = self.app_title
            models = self.models

        # append a model list module and a recent actions module
        self.children += [
            # modules.ModelList(self.app_title, self.models),
            modules.ModelList(app_title, models),
            modules.RecentActions(
                _('Recent Actions'),
                include_list=self.get_app_content_types(),
                limit=5,
            ),
        ]
Beispiel #34
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # we disable title because its redundant with the model list module
        self.title = ''

        settings_app_names = getattr(settings, "APP_NAMES", {})
        try:
            title = settings_app_names[self.app_title.lower()]
        except KeyError:
            title =  self.app_title
        # append a model list module
        self.children.append(modules.ModelList(
            title=title,
            include_list=self.models,
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            title=_('Recent Actions'),
            include_list=self.get_app_content_types(),
        ))
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        # TODO: Find out better way
        if str(self.app_title) == 'Dialer_Settings':
            app_title = _('Dialer Settings')
            models = ['dialer_settings.*']
        elif str(self.app_title) == 'Dialer_Campaign':
            app_title = _('Dialer Campaign')
            models = ['dialer_campaign.*']
        elif str(self.app_title) == 'Dialer_Contact':
            app_title = _('Dialer Contact')
            models = ['dialer_contact.*']
        elif str(self.app_title) == 'Dialer_Cdr':
            app_title = _('Dialer CDR')
            models = ['dialer_cdr.*']
        elif str(self.app_title) == 'Dialer_Gateway':
            app_title = _('Dialer Gateway')
            models = ['dialer_gateway.*']
        elif str(self.app_title) == 'Country_Dialcode':
            app_title = _('Country Dialcode')
            models = ['country_dialcode.*']
        elif str(self.app_title) == 'Dnc':
            app_title = _('Do Not Call')
            models = ['dnc.*']
        else:
            app_title = self.app_title
            models = self.models

        # append a model list module and a recent actions module
        self.children += [
            #modules.ModelList(self.app_title, self.models),
            modules.ModelList(app_title, models),
            modules.RecentActions(
                _('Recent Actions'),
                include_list=self.get_app_content_types(),
                limit=5,
            ),
        ]
Beispiel #36
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)
        #self.columns = 3
        self.title = 'Видео архив'
        self.children.append(
            modules.ModelList(
                title = u'Переводы',
                models=(
                    'videoarchive.models.Language',
                    'videoarchive.models.Group',
                    'videoarchive.models.Translation',
                ),
            ),
        )
        self.children.append(
            modules.ModelList(
                title = u'Настройки',
                models=(
                    'videoarchive.models.Settings',
#                    'videoarchive.communicator.models.Communicator',
                    'videoarchive.va.models.VaArchive',
                    'videoarchive.va.models.VaCamera',
                    'videoarchive.models.Signals',
                    'videoarchive.models.Week',
                ),
            )
        )
        
        self.children.append(
            modules.ModelList(
                title = u'Временные',
                models=(
                    'videoarchive.persons.models.Person',
                    'videoarchive.persons.models.Document',
                ),
            )
        )
Beispiel #37
0
 def __init__(self, *args, **kwargs):
     AppIndexDashboard.__init__(self, *args, **kwargs)
     # we disable title because its redundant with the model list module
     self.title = ''
     self.columns = 1
     # append a model list module
     from django.utils.safestring import mark_safe
     self.children.append(modules.ModelList(
         title=_(self.app_title),
         include_list=self.models,
         draggable=False,
         deletable=False,
         collapsible=False,
         pre_content=mark_safe( (u'Here you can edit only <b>part of your site: Module %s </b>. ' +
                                 u'To see the hole picture - <a href="%s">back to Main</a>') % (_(self.app_title), reverse('admin:index'))),
     ))
     # append a recent actions module
     self.children.append(modules.RecentActions(
         title=u'Recent changes in this module',
         draggable=False,
         deletable=False,
         collapsible=False,
         include_list=self.get_app_content_types(),
     ))
Beispiel #38
0
    def __init__(self, *args, **kwargs):
        AppIndexDashboard.__init__(self, *args, **kwargs)

        self.children += [
            modules.Group(
                title=_('Collection'),
                display='tabs',
                children=[
                    modules.AppList(
                        title=_('Coins'),
                        models=(
                            'coins.models.CoinIssue',
                            'coins.models.Coin',
                            'coins.models.Mint',
                            'coins.models.MintMark',
                        )
                    ),
                    modules.AppList(
                        title=_('Banknotes'),
                        models=(
                            'coins.models.BanknoteIssue',
                            'coins.models.Banknote',
                        )
                    ),
                    modules.AppList(
                        title=_('Countries & currencies'),
                        models=(
                            'coins.models.Country',
                            'coins.models.Currency',
                        )
                    ),
                    modules.AppList(
                        title=_('Other'),
                        models=(
                            'coins.models.Collection',
                            'coins.models.Series',
                        )
                    )
                ]
            ),
            modules.LinkList(
                _('Links'),
                children=[
                    {
                        'title': _('Commemorative and '
                                   'Investment Coins database'),
                        'url': 'http://cbr.ru/bank-notes_coins/'
                               '?Prtid=coins_base',
                        'external': True,
                        'attrs': {'target': '_blank'},
                    },
                    {
                        'title': _('Collection list in google docs'),
                        'url': 'https://docs.google.com/a/kihamo.ru/'
                               'spreadsheet/ccc?key=0AlUZ0Eqd4UJwdEZ'
                               'RTHVWMVFCcW5TX0JqSGh2ZGptS1E&usp=sharing',
                        'external': True,
                        'attrs': {'target': '_blank'},
                    }
                ]
            ),
            modules.RecentActions(
                _('Recent Actions'),
                include_list=self.get_app_content_types(),
                limit=5
            )
        ]
 def __init__(self, app_title, models, **kwargs):
     AppIndexDashboard.__init__(self, app_title, models, **kwargs)
     self.columns = 3
Beispiel #40
0
 def __init__(self, *args, **kwargs):
     AppIndexDashboard.__init__(self, *args, **kwargs)
Beispiel #41
0
 def __init__(self, *args, **kwargs):
     AppIndexDashboard.__init__(self, *args, **kwargs)
Beispiel #42
0
 def test_models(self):
     models = ['django.contrib.auth.models.User',
               'django.contrib.auth.models.Group']
     board = AppIndexDashboard('Auth', models)
     self.assertEqual(board.get_app_model_classes(), [User, Group])