Пример #1
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append a group for "Administration" & "Applications"
        self.children.append(
            modules.Group(
                _('Group: Administration & Applications'),
                column=1,
                collapsible=True,
                children=[
                    modules.AppList(
                        _('Applications'),
                        column=1,
                        css_classes=('collapse closed', ),
                        #exclude=('django.contrib.*',),
                        models=(
                            'agencies.*',
                            'people.*',
                        ),
                    ),
                    modules.AppList(
                        _('Administration'),
                        column=1,
                        #collapsible=False,
                        models=('django.contrib.*', ),
                    ),
                ]))
        """
Пример #2
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,
             },
         ]
     ))
Пример #3
0
    def init_with_context(self, context):
       # site_name = get_admin_site_name(context)
        
        # append a group for "Administration" & "Applications"
        self.children.append(modules.Group(
            _('Sistema de Educacion'),
            column=1,
            collapsible=True,
            children = [
                modules.AppList(
                    _('Administracion de Usuarios'),
                    column=1,
                    collapsible=False,
                    models=('django.contrib.*',),
                )
            ]
        ))
        
        # append an app list module for "Applications"
        self.children.append(modules.AppList(
            _('Sistemas de Educacion'),
            collapsible=True,
            column=1,
            css_classes=('collapse closed',),
            exclude=('django.contrib.*','educar.models.Tipo_Material','educar.models.Material_Educativo','educar.models.Parametros_evaluacion',),
        ))
                # append an app list module for "Applications"
        self.children.append(modules.AppList(
            _('Gestion de Material Educativo'),
            collapsible=True,
            column=2,
            css_classes=('collapse closed',),
            exclude=('django.contrib.*','educar.models.Clase','educar.models.Profesor','educar.models.Estudiante','educar.models.Parametros_evaluacion','educar.models.Evaluacion',),
        ))

        self.children.append(modules.AppList(
            _('Gestion de Calificacion de Estudiantes'),
            collapsible=True,
            column=2,
            css_classes=('collapse closed',),
            exclude=('django.contrib.*','educar.models.Clase','educar.models.Profesor','educar.models.Estudiante','educar.models.Tipo_Material','educar.models.Examen','educar.models.Material_Educativo',),
        ))
          # append an app list module for "Applications"
        self.children.append(modules.AppList(
            _('Reportes de Notas'),
            collapsible=True,
            column=1,
            css_classes=('collapse closed',),
            exclude=('django.contrib.*','educar.models.Clase','educar.models.Profesor','educar.models.Estudiante','educar.models.Tipo_Material','educar.models.Material_Educativo','educar.models.Parametros_evaluacion',),

        ))
       
        # append a recent actions module
        self.children.append(modules.RecentActions(
            _('Recent Actions'),
            limit=5,
            collapsible=True,
            column=3,
        ))
Пример #4
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        main_link_sets = self.main_model.objects.all()
        for link_set in main_link_sets:

            children = link_set.get_children()
            child_links = [link.model_path for link in children]
            # -- Django Admin

            classes = ['grp-closed'] if not link_set.open_by_default else []
            self.children.append(
                modules.AppList(title=_(link_set.title),
                                column=1,
                                collapsible=True,
                                models=child_links,
                                css_classes=classes))

        classes = ['grp-closed'] if main_link_sets.count() > 0 else []

        # -- Django Admin
        self.children.append(
            modules.AppList(title=_('All Models'),
                            column=1,
                            collapsible=True,
                            css_classes=classes))

        sidebar_link_sets = self.sidebar_model.objects.all()
        for link_set in sidebar_link_sets:

            children = []
            child_links = link_set.get_children()
            for child_link in child_links:
                children.append({
                    'title': child_link.title,
                    'url': child_link.url,
                    'external': False
                })

            # append another link list module for "support".
            self.children.append(
                modules.LinkList(link_set.title, column=2, children=children))

        # self.children.append(AdminTasksDashboardModule(

        #     _('Admin Tasks'),
        #     column=2,

        # ))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=2,
            ))
Пример #5
0
    def init_with_context(self, context):
        user = context.get('request').user
        site_name = get_admin_site_name(context)

        self.children.append(
            modules.AppList(
                _('Advertising Contracts'),
                column=1,
                models=('contracts.*', ),
            ))

        if user.is_superuser:
            self.children.append(
                modules.AppList(
                    _('User Accounts'),
                    column=1,
                    collapsible=False,
                    models=('account.*', 'django.contrib.auth.*', 'mysite.*'),
                ))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(_('Media Management'),
                             column=2,
                             collapsible=False,
                             children=[
                                 {
                                     'title': _('File Browser'),
                                     'url': '/admin/filebrowser/browse/',
                                     'external': False,
                                 },
                             ]))

        if user.is_superuser:
            self.children.append(
                modules.AppList(
                    _('Server Administration'),
                    column=2,
                    collapsible=False,
                    exclude=('account.*', 'django.contrib.auth.*', 'mysite.*',
                             'contracts.*'),
                ))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=3,
            ))
Пример #6
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children.append(
            modules.Group(_('Group: Administration & Applications'),
                          column=1,
                          collapsible=True,
                          children=[
                              modules.AppList(
                                  _('Administration'),
                                  column=1,
                                  collapsible=False,
                                  models=('django.contrib.*', ),
                              ),
                          ]))

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _('AppList: Applications'),
                collapsible=True,
                column=1,
                css_classes=('collapse closed', ),
                exclude=('django.contrib.*', ),
            ))
        self.children.append(
            modules.ModelList(
                _('ModelList: Administration'),
                column=1,
                collapsible=False,
                models=('django.contrib.*', ),
            ))
        self.children.append(
            modules.LinkList(_('Support'),
                             column=2,
                             children=[
                                 {
                                     'title': _('github'),
                                     'url':
                                     'https://gitee.com/weihaoxuan/Aclsm/',
                                     'external': True,
                                 },
                             ]))
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=3,
            ))
Пример #7
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append an app list module for "Applications"
        self.children.append(modules.AppList(
            _('AppList: Applications'),
            collapsible=True,
            column=1,
            css_classes=('collapse closed',),
            exclude=('django.contrib.*', 'allauth.*', 'people.*'),
        ))


        # append a group for "Administration" & "Applications"
        self.children.append(modules.Group(
            _('Group: Administration & Applications'),
            column=1,
            collapsible=True,
            children = [
                modules.AppList(
                    _('Administration'),
                    column=1,
                    collapsible=False,
                    models=('django.contrib.*', 'people.*', 'allauth.*'),
                ),
            ]
        ))

        # append another link list module for "support".
        self.children.append(modules.LinkList(
            _('Media Management'),
            column=2,
            children=[
                {
                    'title': _('FileBrowser'),
                    'url': '/admin/filebrowser/browse/',
                    'external': False,
                },
            ]
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            _('Recent Actions'),
            limit=5,
            collapsible=False,
            column=3,
        ))
Пример #8
0
    def init_with_context(self, context):
        self.children.append(modules.AppList(
            _("Applications"),
            collapsible=True,
            column=1,
            css_classes=('collapse closed',),
            exclude=('django.contrib.*',),
        ))

        self.children.append(modules.ModelList(
            _("Users"),
            column=1,
            collapsible=False,
            models=(
                'django.contrib.auth.models.Group',
                'auth_custom.models.User',
                'auth_custom.models.SignUpRequest',
            ),
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            _("Recent Actions"),
            limit=5,
            collapsible=False,
            column=3,
        ))
Пример #9
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _('Applications'),
                collapsible=True,
                column=1,
                css_classes=('collapse closed', ),
                # exclude=('django.contrib.*',),
            ))

        # append a recent actions module
        self.children.append(
            modules.LinkList(layout='inline',
                             column=2,
                             children=([
                                 'Pošalji e-mail svim korisnicima',
                                 reverse('members_mass_mail')
                             ], )))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=3,
            ))
Пример #10
0
 def init_with_context(self, context):
     site_name = get_admin_site_name(context)
     
     #append an app list module for "Applications"
     self.children.append(modules.AppList(
         _('Site Components'),
         collapsible=True,
         column=1,
         css_classes=('collapse closed',),
         exclude=('django.contrib.*',),
     ))
     
     # append an app list module for "Administration"
     self.children.append(modules.ModelList(
         _('System Administration'),
         column=1,
         collapsible=True,
         css_classes=('collapse closed',),
         models=('django.contrib.*',),
     ))
     
     # append another link list module for "support".
     self.children.append(modules.LinkList(
         _('Media Management'),
         column=2,
         children=[
             {
                 'title': _('FileBrowser'),
                 'url': './filebrowser/browse/',
                 'external': False,
             },
         ]
     ))
Пример #11
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)
        current_site = Site.objects.get_current()

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _('Applications'),
                collapsible=True,
                column=1,
                css_classes=('collapse closed', ),
                exclude=('', ),
            ))

        # append an app list module for "Administration"
        # ...

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(_('Menu'),
                             column=2,
                             children=[{
                                 'title': _('Go to site'),
                                 'url': 'http://' + current_site.domain,
                                 'external': True,
                             }]))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=2,
            ))
Пример #12
0
    def init_with_context(self, context):
        site = context.get("site")

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _('Applications'),
                collapsible=True,
                column=1,
                css_classes=('collapse', ),
                exclude=('django.contrib.*', ),
            ))

        # append an app list module for "Administration"
        self.children.append(
            modules.ModelList(
                _('Administration'),
                column=1,
                collapsible=True,
                css_classes=('grp-closed', ),
                models=('django.contrib.*', ),
            ))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(_('Media Management'),
                             column=2,
                             children=[
                                 {
                                     'title': _('FileBrowser'),
                                     'url': '/admin/filebrowser/browse/',
                                     'external': False,
                                 },
                             ]))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(_('Support'),
                             column=2,
                             children=[{
                                 'title': _('Opps Documentation'),
                                 'url': 'http://www.oppsproject.org/',
                                 'external': True,
                             }]))

        # append a feed module
        self.children.append(
            modules.Feed(_('Latest Publications'),
                         column=2,
                         feed_url='http://{0}/rss'.format(site.domain),
                         limit=10))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=3,
            ))
Пример #13
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _('Applications'),
                collapsible=True,
                column=1,
                exclude=('django.contrib.*', "fandjango.*"),
            ))

        # append an app list module for "Administration"
        self.children.append(
            modules.ModelList(
                _('Administration'),
                column=1,
                collapsible=False,
                models=('django.contrib.*', ),
            ))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=3,
            ))
Пример #14
0
    def init_with_context(self, context):
        self.children = []

        self.children.append(
            modules.AppList(
                column=1,
                title='Administration',
            ))
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)  # noqa

        # append an app list module for "Applications"
        self.children.append(modules.AppList(
            _('AppList: Applications'),
            collapsible=True,
            column=1,
            css_classes=('collapse closed',),
            exclude=('django.contrib.*',),
        ))

        # append an app list module for "Administration"
        self.children.append(modules.ModelList(
            _('ModelList: Administration'),
            column=1,
            collapsible=False,
            models=('django.contrib.*',),
        ))

        # append another link list module for "support".
        self.children.append(modules.LinkList(
            _('Media Management'),
            column=2,
            children=[
                {
                    'title': _('FileBrowser'),
                    'url': '/admin/filebrowser/browse/',
                    'external': False,
                },
            ]
        ))

        # append another link list module for "support".
        self.children.append(modules.LinkList(
            _('Support'),
            column=2,
            children=[
                {
                    'title': _('Django Documentation'),
                    'url': 'http://docs.djangoproject.com/',
                    'external': True,
                },
                {
                    'title': _('Grappelli Documentation'),
                    'url': 'http://packages.python.org/django-grappelli/',
                    'external': True,
                },
            ]
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            _('Recent Actions'),
            limit=5,
            collapsible=False,
            column=3,
        ))
Пример #16
0
    def init_with_context(self, context):
        # append an app list module for "Applications"
        from infos.models import MOTDMessage
        from django.template.defaultfilters import linebreaksbr
        self.children.append(
            modules.DashboardModule(
                column=1,
                title="MOTD",
                collapsible=False,
                pre_content='<ul class="grp-listing-small">' + ''.join([
                    '<li class="grp-row"><h5><strong>{}</strong></h5> {}</li>'.
                    format(obj.subject, linebreaksbr(obj.content))
                    for obj in MOTDMessage.objects.filter(
                        display=True).order_by('-modified')
                ]) + "</ul>"))

        self.children.append(
            modules.AppList(
                _('Tools'),
                collapsible=True,
                column=1,
                css_classes=('collapse closed', ),
                exclude=('django.contrib.*', ),
            ))

        # append an app list module for "Administration"
        self.children.append(
            modules.ModelList(
                _('ModelList: Administration'),
                column=1,
                collapsible=False,
                models=('django.contrib.*', ),
            ))

        # append another link list module for "support".
        from infos.models import LinkList
        self.children.append(
            modules.LinkList(
                _('Link List'),
                column=2,
                children=[{
                    'title': obj.name,
                    'url': obj.url,
                    'external': False,
                } for obj in LinkList.objects.filter(
                    display_on_dashboard=True).order_by('-modified')]))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=3,
            ))
Пример #17
0
    def __init__(self, **kwargs):

        Dashboard.__init__(self, **kwargs)

        # append an app list module for "Applications"
        self.children.append(modules.AppList(
            title=_('Applications'),
            column=1,
            collapsible=True,
            exclude=('django.contrib.*',),
        ))

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

        # append a recent actions module
        self.children.append(modules.RecentActions(
            title=_('Recent Actions'),
            column=2,
            collapsible=False,
            limit=5,
        ))

        self.children.append(modules.LinkList(
            layout='inline',
            column=2,
            children=(
                {
                    'title': 'Python website',
                    'url': 'http://www.python.org',
                    'external': True,
                    'description': 'Python programming language rocks!',
                },
                ['Django website', 'http://www.djangoproject.com', True],
                ['Some internal link', '/some/internal/link/'],
            )
        ))
Пример #18
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children.append(modules.Group(
            _('Услуги'),
            column=1,
            collapsible=True,
            children=[
                modules.AppList(
                    _('Разработка'),
                    column=1,
                    collapsible=False,
                    models=('landing.models.*','card.models.*','catalog.models.*','online_store.models.*'),
                ),
                modules.AppList(
                    _('Продвижение'),
                    column=1,
                    collapsible=False,
                    models=('seo.models.*','smm.models.*','context.models.*'),
                )
            ]
        ))

        self.children.append(modules.Group(
            _('Администрирование'),
            column=2,
            collapsible=True,
            children = [
                modules.AppList(
                    _('Администрация'),
                    column=2,
                    collapsible=False,
                    models=('django.contrib.*',),
                ),
                modules.AppList(
                    _('Главная'),
                    column=2,
                    collapsible=False,
                    models=('main.models.*',),
                )
            ]
        ))
Пример #19
0
    def init_with_context(self, context):
        site_name = u'早苗的空想庭院'

        self.children.append(
            modules.AppList(
                _(u'文章管理'),
                collapsible=False,
                column=2,
                css_classes=('collapse closed', ),
                exclude=('django.contrib.*', ),
            ))
Пример #20
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append an app list module for "Administration"
        self.children.append(
            modules.ModelList(
                _('ModelList: Hopespace'),
                column=1,
                collapsible=False,
                models=('hopespace.*', ),
            ))

        # append a group for "Administration" & "Applications"
        self.children.append(
            modules.Group(_('Group: Administration'),
                          column=1,
                          collapsible=True,
                          children=[
                              modules.AppList(
                                  _('Django admin apps'),
                                  column=1,
                                  collapsible=False,
                                  models=('django.contrib.*', ),
                              ),
                              modules.AppList(
                                  _('Third party admin apps'),
                                  column=1,
                                  css_classes=('collapse closed', ),
                                  exclude=('django.contrib.*', 'hopespace.*'),
                              )
                          ]))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=2,
            ))
Пример #21
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children.append(
            modules.AppList(
                _('Mysite'),
                column=1,
                collapsible=False,
                models=('mysite.*'),
            ))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(_('Media Management'),
                             column=2,
                             collapsible=False,
                             children=[
                                 {
                                     'title': _('File Browser'),
                                     'url': '/admin/filebrowser/browse/',
                                     'external': False,
                                 },
                             ]))

        self.children.append(
            modules.AppList(
                _('Server Administration'),
                column=2,
                collapsible=False,
                exclude=('mysite.*'),
            ))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=3,
            ))
Пример #22
0
 def __init__(self, **kwargs):
         Dashboard.__init__(self, **kwargs)
         self.children.append(modules.Group(
             title= _('Admin central'),
             column=1,
             collapsible=True,
             children=[
                 modules.AppList(
                     title=_('Administration'),
                     collapsible=False,
                     models=('django.contrib.*',)
                 ),
                 modules.AppList(
                     title=_('Applications'),
                     collapsible=False,
                     exclude=('django.contrib.*',)
                 )
             ]
         ))
         
         self.children.append(modules.AppList(
             title=_('Admin'),
             column=1,
             collapsible=True,
             models=('django.contrib.*',)
         ))
         
         self.children.append(modules.AppList(
             title=_('Apps'),
             column=1,
             collapsible=True,
             exclude=('django.contrib.*',)
         ))
         
         self.children.append(modules.RecentActions(
             title=_('Recent Actions'),
             column=3,
             collapsible=False,
             limit=5,
         ))
Пример #23
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append a group for "Administration" & "Applications"
        self.children.append(
            modules.Group(
                _("Group: Administration & Applications"),
                column=1,
                collapsible=True,
                children=[
                    modules.AppList(
                        _("Administration"),
                        column=1,
                        collapsible=False,
                        models=("django.contrib.*", ),
                    ),
                ],
            ))
        self.children.append(
            modules.Group(
                _("Group: Administration & Applications"),
                column=2,
                collapsible=True,
                children=[
                    modules.AppList(
                        _("Applications"),
                        column=1,
                        css_classes=("collapse closed", ),
                        exclude=("django.contrib.*", ),
                    ),
                ],
            ))
        self.children.append(
            modules.RecentActions(
                title='Recent actions',
                column=3,
                limit=5,
            ))
Пример #24
0
    def init_with_context(self, context):
        # site_name = get_admin_site_name(context)
        # request = context['request']

        # append a model list module for "Applications"
        self.children.append(
            modules.ModelList(
                _('Blog'),
                column=1,
                collapsible=True,
                models=('apps.blog.*', 'apps.comments.*', 'apps.*'),
                exclude=('apps.profiles.*', ),
            ))

        # append a group for "Administration"
        self.children.append(
            modules.Group(
                _('Administration'),
                column=1,
                collapsible=True,
                children=[
                    modules.ModelList(
                        _('Authentication and Authorization'),
                        column=1,
                        collapsible=False,
                        models=('apps.profiles.*', 'django.contrib.auth.*',
                                'rest_framework.authtoken.*'),
                    ),
                    modules.AppList(
                        _('Dictionaries'),
                        collapsible=False,
                        column=1,
                        css_classes=('collapse closed', ),
                        exclude=(
                            'apps.*',
                            'django.contrib.*',
                            'rest_framework.*',
                        ),
                    )
                ],
            ))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent actions'),
                limit=10,
                collapsible=False,
                column=2,
            ))
Пример #25
0
    def init_with_context(self, context):
        get_admin_site_name(context)

        url = lambda m: reverse("admin:%s_%s_changelist" % (m, m))

        self.children.append(modules.AppList(
            _(u'Conteúdos'),
            column=1,
            collapsible=True,
            models=(
                'pacote.models.Pacote',
                'destino.models.Destino',
                'destino.models.Estado',
                'destino.models.Regiao',
                'destino.models.Pais',
                'fiber.models.Page',
            ),
        ))

        self.children.append(modules.LinkList(
            _(u'Vendas'),
            collapsible=True,
            column=2,
            children=[
                {'title': 'Pedidos',
                 'url': reverse('admin:pedido_pedido_changelist')},
                {'title': 'Clientes',
                 'url': reverse('admin:cliente_cliente_changelist')},
            ]
        ))

        url = lambda m: reverse("admin:configuracao_%s_changelist" % m)
        self.children.append(modules.LinkList(
            title=_(u'Configurações'),
            collapsible=True,
            column=3,
            children=[
                {'title': "Empresa", 'url': url("empresa")},
                {'title': "Formas de Pagamento", 'url': url("formapagamento")},
            ]
        ))

        self.children.append(modules.RecentActions(
            _(u'Ações recentes'),
            limit=10,
            collapsible=True,
            css_classes=('collapse closed grp-closed',),
            column=3,
        ))
Пример #26
0
 def init_with_context(self, context):
   site_name = get_admin_site_name(context)
   title = _('Dashboard')
   self.children.append(modules.AppList(
       title=('Gestion y manejo de Documentos Personeria'),
       collapsible=False,
       column=1,
       css_classes=('collapse closed',),
       exclude=('django.contrib.*',),
   ))
   # append a recent actions module
   self.children.append(modules.RecentActions(
       _('Recent Actions'),
       limit=5,
       collapsible=False,
       column=3,
   ))
Пример #27
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # custom group
        self.children.append(
            modules.LinkList(_('Links'),
                             column=2,
                             children=[
                                 {
                                     'title': _('MAPS App'),
                                     'url': reverse('base'),
                                     'external': True,
                                 },
                                 {
                                     'title': _('Batch Import Entries'),
                                     'url': reverse('import_entries'),
                                 },
                             ]))

        self.children.append(
            modules.ModelList(
                title='Surveys and Entries',
                column=1,
                models=('maps.models.Survey', 'entries.models.Entry'),
                pre_content='<h4>Create surveys and assign user entries</h4>'))

        self.children.append(
            modules.AppList(
                _('Administration'),
                column=1,
                models=('django.contrib.*', ),
                #models=('django.contrib.sites.models.Site',),
                exclude=('django.contrib.sites.models.Site', ),
                pre_content='<h4>Manage users, groups and permissions</h4>'))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=10,
                collapsible=False,
                column=3,
            ))
Пример #28
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _('Dados do Atados'),
                collapsible=True,
                column=1,
                css_classes=('collapse closed', ),
                exclude=('django.contrib.*', ),
            ))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(
                _('Suporte'),
                column=3,
                children=[
                    {
                        'title': _('Achou algum bug?'),
                        'url':
                        'https://docs.google.com/forms/d/1INXr7s1ZTpOIcxw3uC8RBBERPOAF7YQw-nCryqCW6w0/viewform',
                        'external': True,
                    },
                    {
                        'title': _('Bugs existentes'),
                        'url':
                        'https://docs.google.com/spreadsheet/ccc?key=0AsFzBC8sBaDbdDBZYml6Z0ppb0VVbjdhdzRLelBoc0E#gid=0',
                        'external': True,
                    },
                ]))

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=15,
                collapsible=True,
                column=2,
            ))
Пример #29
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        # append a group for "Administration" & "Applications"
        self.children.append(
            modules.Group(_('Group: Administration & Applications'),
                          column=1,
                          collapsible=True,
                          children=[
                              modules.AppList(
                                  _('Administration'),
                                  column=1,
                                  collapsible=False,
                                  models=('django.contrib.*', ),
                              ),
                              modules.AppList(
                                  _('Applications'),
                                  column=1,
                                  css_classes=('collapse closed', ),
                                  exclude=('django.contrib.*', ),
                              )
                          ]))

        # append an app list module for "Applications"
        self.children.append(
            modules.AppList(
                _('AppList: Applications'),
                collapsible=True,
                column=1,
                css_classes=('collapse closed', ),
                exclude=('django.contrib.*', ),
            ))

        # append an app list module for "Administration"
        self.children.append(
            modules.ModelList(
                _('ModelList: Administration'),
                column=1,
                collapsible=False,
                models=('django.contrib.*', ),
            ))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(_('Media Management'),
                             column=2,
                             children=[
                                 {
                                     'title': _('FileBrowser'),
                                     'url': '/ggvadmin/filebrowser/browse/',
                                     'external': False,
                                 },
                             ]))

        # append another link list module for "support".
        self.children.append(
            modules.LinkList(
                _('Support'),
                column=2,
                children=[
                    {
                        'title': _('Django Documentation'),
                        'url': 'http://docs.djangoproject.com/',
                        'external': True,
                    },
                    {
                        'title': _('Grappelli Documentation'),
                        'url': 'http://packages.python.org/django-grappelli/',
                        'external': True,
                    },
                    {
                        'title': _('Grappelli Google-Code'),
                        'url': 'http://code.google.com/p/django-grappelli/',
                        'external': True,
                    },
                ]))

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

        # append a recent actions module
        self.children.append(
            modules.RecentActions(
                _('Recent Actions'),
                limit=5,
                collapsible=False,
                column=3,
            ))
Пример #30
0
    def init_with_context(self, context):
        site_name = get_admin_site_name(context)

        self.children.append(modules.LinkList(
           title=_('Quick Links'),
           layout='inline',
           column=1,
           collapsible=True,
           css_classes=('collapse closed',),
           children=(
           {
                    'title': _('Return to site'),
                    'url': '/',
                },
                {
                    'title': _('Change password'),
                    'url': reverse('admin:password_change'),
                },
                {
                    'title': _('Log out'),
                    'url': reverse('admin:logout')
                },
           )

       ))

        # append a group for "Administration"
        self.children.append(modules.Group(
            _('Administration'),
            column=1,
            collapsible=True,
            children = [
                modules.AppList(
                    _('Administration'),
                    column=1,
                    collapsible=False,
                    models=('django.contrib.*','registration','accounts'),
                ),
            ]
        ))

        # append an app list module for "Applications"
        self.children.append(modules.AppList(
            title="OpenEats2 Applications",
            collapsible=True,
            column=1,
            models=('recipe*',),
        ))

        # append an app list module for "Administration"
        self.children.append(modules.AppList(
            _('Third Party Applications'),
            column=1,
            collapsible=True,
            exclude=('django.contrib.*','openeats.*','recipe*',)
        ))

        # append a recent actions module
        self.children.append(modules.RecentActions(
            _('Recent Actions'),
            limit=5,
            collapsible=False,
            column=2,
        ))

        # append another link list module for "support".
        self.children.append(modules.LinkList(
            _('Support'),
            column=2,
            children=[
                                    {
                    'title': _('OpenEats Forum'),
                    'url': 'http://oe2.openeats.org/forum/',
                    'external': True,
                },
                {
                    '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,
                },
            ]
        ))

        # append a feed module
        self.children.append(modules.Feed(
            _('Latest OpenEats2 News'),
            column=2,
            feed_url='http://oe2.openeats.org/blog/feed/latest',
            limit=5
        ))