Module Expr Str ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias alias ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad For NameStore NameLoad body If Call NameLoad AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Assign AttributeStore NameLoad attr BoolOpOr AttributeLoad NameLoad attr ListLoad Assign AttributeStore NameLoad attr BoolOpOr AttributeLoad NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BoolOpAnd CompareIs AttributeLoad NameLoad attr NameLoad CompareIs AttributeLoad NameLoad attr NameLoad CompareEq Call NameLoad AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str AugAssignAdd NameStore AttributeLoad NameLoad attr Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Return For NameStore AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr CompareEq AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call AttributeLoad Call NameLoad NameLoad NameLoad attr body Return NameLoad For NameStore AttributeLoad NameLoad attr body If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr BoolOpOr AttributeLoad NameLoad attr BinOpAdd NameLoad Num Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Return Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body If Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore Dict Str Str SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If CompareGtE Call NameLoad NameLoad Num body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Num If CompareGtE Call NameLoad NameLoad Num body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Num If CompareGtE Call NameLoad NameLoad Num body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Num Assign NameStore NameLoad If CompareNotIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Dict Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str SubscriptLoad NameLoad Index Str If Call AttributeLoad NameLoad attr Str Str body Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str SubscriptLoad NameLoad Index Str If Call AttributeLoad NameLoad attr Str NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str Call AttributeLoad Call AttributeLoad Str attr BinOpAdd ListLoad Str Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Str attr attr Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad Str Assign NameStore Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str ListLoad Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str ListLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Return Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Dict For TupleStore NameStore NameStore NameLoad body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If CompareNotIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Dict Str Str Str AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad ListLoad Assign NameStore Dict Assign SubscriptStore NameLoad Index Str AttributeLoad AttributeLoad NameLoad attr attr If SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad NameLoad If SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str attr NameLoad For NameStore Call NameLoad Call AttributeLoad NameLoad attr body Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str attr keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad NameLoad body Expr Str Assign NameStore Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad kwarg body Assign AttributeStore NameLoad attr Call NameLoad BoolOpOr NameLoad ListLoad Assign AttributeStore NameLoad attr Call NameLoad BoolOpOr NameLoad ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str ListLoad If CompareIn Str NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str orelse Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Return Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str If UnaryOpNot NameLoad body Return For TupleStore NameStore NameStore NameLoad body Assign NameStore Dict Assign SubscriptStore NameLoad Index Str AttributeLoad AttributeLoad NameLoad attr attr If SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad NameLoad If SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body Assign NameStore Dict Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str Assign NameStore Str Assign NameStore Num Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad NameLoad kwarg body Assign AttributeStore NameLoad attr BoolOpOr NameLoad ListLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad ListLoad Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Return ImportFrom alias ImportFrom alias Assign NameStore SubscriptLoad NameLoad Index Str FunctionDef arguments args NameParam defaults body ImportFrom alias Assign NameStore NameLoad For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr orelse TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str handlers ExceptHandler body Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore BinOpBitOr NameLoad NameLoad Return NameLoad decorator_list If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Str Str Slice AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad Str Assign NameStore Str Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad kwarg body Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Return Import alias If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str TryExcept body Import alias handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str NameLoad Return Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Slice AttributeLoad NameLoad attr orelse Assign NameStore SubscriptLoad NameLoad Index Str For NameStore NameLoad body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr TryExcept body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num Num handlers ExceptHandler body Pass Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
Module where admin tools dashboard modules classes are defined.
 django.apps apps django_apps django.core.urlresolvers reverse django.forms.utils flatatt django.utils.itercompat is_iterable django.utils.text capfirst django.utils.translation ugettext_lazy _ admin_tools.utils AppListElementMixin uniquify DashboardModule N/A object N/A N/A 
    Base class for all dashboard modules.
    Dashboard modules have the following properties:

    ``enabled``
        Boolean that determines whether the module should be enabled in
        the dashboard by default or not. Default value: ``True``.

    ``draggable``
        Boolean that determines whether the module can be draggable or not.
        Draggable modules can be re-arranged by users. Default value: ``True``.

    ``collapsible``
        Boolean that determines whether the module is collapsible, this
        allows users to show/hide module content. Default: ``True``.

    ``deletable``
        Boolean that determines whether the module can be removed from the
        dashboard by users or not. Default: ``True``.

    ``title``
        String that contains the module title, make sure you use the django
        gettext functions if your application is multilingual.
        Default value: ''.

    ``title_url``
        String that contains the module title URL. If given the module
        title will be a link to this URL. Default value: ``None``.

    ``css_classes``
        A list of css classes to be added to the module ``div`` class
        attribute. Default value: ``None``.

    ``pre_content``
        Text or HTML content to display above the module content.
        Default value: ``None``.

    ``content``
        The module text or HTML content. Default value: ``None``.

    ``post_content``
        Text or HTML content to display under the module content.
        Default value: ``None``.

    ``template``
        The template to use to render the module.
        Default value: 'admin_tools/dashboard/module.html'.
     N/A template admin_tools/dashboard/module.html N/A enabled True N/A draggable True N/A collapsible True N/A deletable True N/A show_title True N/A title N/A title_url None N/A css_classes None N/A pre_content None N/A post_content None N/A children None N/A id None __init__ N/A N/A self title N/A None kwargs N/A N/A N/A title None N/A N/A N/A self title title N/A key kwargs N/A N/A N/A hasattr N/A self __class__ key N/A N/A N/A setattr self key N/A kwargs N/A key N/A N/A self children N/A N/A self children N/A N/A N/A self css_classes N/A N/A self css_classes N/A N/A N/A self _initialized False N/A init_with_context N/A N/A self context N/A N/A N/A 
        Like for the :class:`~admin_tools.dashboard.Dashboard` class, dashboard
        modules have a ``init_with_context`` method that is called with a
        ``django.template.RequestContext`` instance as unique argument.

        This gives you enough flexibility to build complex modules, for
        example, let's build a "history" dashboard module, that will list the
        last ten visited pages::

            from admin_tools.dashboard import modules

            class HistoryDashboardModule(modules.LinkList):
                title = 'History'

                def init_with_context(self, context):
                    request = context['request']
                    # we use sessions to store the visited pages stack
                    history = request.session.get('history', [])
                    for item in history:
                        self.children.append(item)
                    # add the current page to the history
                    history.insert(0, {
                        'title': context['title'],
                        'url': request.META['PATH_INFO']
                    })
                    if len(history) > 10:
                        history = history[:10]
                    request.session['history'] = history

        Here's a screenshot of our history item:

        .. image:: images/history_dashboard_module.png
         N/A N/A is_empty N/A N/A self N/A N/A N/A 
        Return True if the module has no content and False otherwise.

        >>> mod = DashboardModule()
        >>> mod.is_empty()
        True
        >>> mod.pre_content = 'foo'
        >>> mod.is_empty()
        False
        >>> mod.pre_content = None
        >>> mod.is_empty()
        True
        >>> mod.children.append('foo')
        >>> mod.is_empty()
        False
        >>> mod.children = []
        >>> mod.is_empty()
        True
         N/A N/A N/A N/A self pre_content None N/A N/A self post_content None N/A N/A len N/A self children 0 N/A render_css_classes N/A N/A self N/A N/A N/A 
        Return a string containing the css classes for the module.

        >>> mod = DashboardModule(enabled=False, draggable=True,
        ...                       collapsible=True, deletable=True)
        >>> mod.render_css_classes()
        'dashboard-module disabled draggable collapsible deletable'
        >>> mod.css_classes.append('foo')
        >>> mod.render_css_classes()
        'dashboard-module disabled draggable collapsible deletable foo'
        >>> mod.enabled = True
        >>> mod.render_css_classes()
        'dashboard-module draggable collapsible deletable foo'
         N/A ret N/A dashboard-module N/A N/A N/A self enabled N/A N/A N/A N/A ret append disabled N/A N/A self draggable N/A N/A N/A N/A ret append draggable N/A N/A self collapsible N/A N/A N/A N/A ret append collapsible N/A N/A self deletable N/A N/A N/A N/A ret append deletable N/A ret N/A self css_classes N/A N/A N/A join ret N/A _prepare_children N/A N/A self N/A N/A N/A N/A N/A Group N/A DashboardModule N/A N/A 
    Represents a group of modules, the group can be displayed in tabs,
    accordion, or just stacked (default).
    As well as the :class:`~admin_tools.dashboard.modules.DashboardModule`
    properties, the :class:`~admin_tools.dashboard.modules.Group`
    has two extra properties:

    ``display``
        A string determining how the group should be rendered, this can be one
        of the following values: 'tabs' (default), 'accordion' or 'stacked'.

    ``force_show_title``
        Default behaviour for Group module is to force children to always show
        the title if Group has ``display`` = ``stacked``. If this flag is set
        to ``False``, children title is shown according to their``show_title``
        property. Note that in this case is children responsibility to have
        meaningful content if no title is shown.

    Here's an example of modules group::

        from admin_tools.dashboard import modules, Dashboard

        class MyDashboard(Dashboard):
            def __init__(self, **kwargs):
                Dashboard.__init__(self, **kwargs)
                self.children.append(modules.Group(
                    title="My group",
                    display="tabs",
                    children=[
                        modules.AppList(
                            title='Administration',
                            models=('django.contrib.*',)
                        ),
                        modules.AppList(
                            title='Applications',
                            exclude=('django.contrib.*',)
                        )
                    ]
                ))

    The screenshot of what this code produces:

    .. image:: images/dashboard_module_group.png
     N/A force_show_title True N/A template admin_tools/dashboard/modules/group.html N/A display tabs init_with_context N/A N/A self context N/A N/A N/A N/A self _initialized N/A N/A N/A module N/A self children N/A N/A N/A module collapsible False N/A N/A module draggable False N/A N/A module deletable False N/A N/A self force_show_title N/A N/A N/A module show_title N/A N/A self display stacked N/A N/A N/A module init_with_context context N/A N/A self _initialized True N/A is_empty N/A N/A self N/A N/A N/A 
        A group of modules is considered empty if it has no children or if
        all its children are empty.

        >>> from admin_tools.dashboard.modules import DashboardModule, LinkList
        >>> mod = Group()
        >>> mod.is_empty()
        True
        >>> mod.children.append(DashboardModule())
        >>> mod.is_empty()
        True
        >>> mod.children.append(LinkList('links', children=[
        ...    {'title': 'example1', 'url': 'http://example.com'},
        ...    {'title': 'example2', 'url': 'http://example.com'},
        ... ]))
        >>> mod.is_empty()
        False
         N/A N/A N/A N/A super Group self is_empty N/A N/A True N/A child N/A self children N/A N/A N/A N/A N/A child is_empty N/A N/A False N/A True N/A _prepare_children N/A N/A self N/A N/A N/A seen N/A set N/A N/A id module N/A enumerate N/A self children N/A N/A proposed_id N/A %s_%s N/A N/A self id N/A N/A module id N/A id 1 N/A N/A module id N/A uniquify proposed_id seen N/A N/A N/A module _prepare_children N/A N/A LinkList N/A DashboardModule N/A N/A 
    A module that displays a list of links.
    As well as the :class:`~admin_tools.dashboard.modules.DashboardModule`
    properties, the :class:`~admin_tools.dashboard.modules.LinkList` takes
    an extra keyword argument:

    ``layout``
        The layout of the list, possible values are ``stacked`` and ``inline``.
        The default value is ``stacked``.

    Link list modules children are simple python dictionaries that can have the
    following keys:

    ``title``
        The link title.

    ``url``
        The link URL.

    ``external``
        Boolean that indicates whether the link is an external one or not.

    ``description``
        A string describing the link, it will be the ``title`` attribute of
        the html ``a`` tag.

    ``attrs``
        Hash comprising attributes of the html ``a`` tag.

    Children can also be iterables (lists or tuples) of length 2, 3, 4 or 5.

    Here's a small example of building a link list module::

        from admin_tools.dashboard import modules, Dashboard

        class MyDashboard(Dashboard):
            def __init__(self, **kwargs):
                Dashboard.__init__(self, **kwargs)

                self.children.append(modules.LinkList(
                    layout='inline',
                    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/'],
                    )
                ))

    The screenshot of what this code produces:

    .. image:: images/linklist_dashboard_module.png
     N/A title N/A _ Links N/A template admin_tools/dashboard/modules/link_list.html N/A layout stacked init_with_context N/A N/A self context N/A N/A N/A N/A self _initialized N/A N/A N/A new_children N/A N/A link N/A self children N/A N/A N/A isinstance link N/A tuple list N/A N/A link_dict N/A title url N/A link N/A 0 N/A link N/A 1 N/A N/A N/A len link 3 N/A N/A N/A link_dict N/A external N/A link N/A 2 N/A N/A N/A len link 4 N/A N/A N/A link_dict N/A description N/A link N/A 3 N/A N/A N/A len link 5 N/A N/A N/A link_dict N/A attrs N/A link N/A 4 N/A link link_dict N/A N/A attrs link N/A N/A N/A link N/A attrs N/A N/A N/A N/A link N/A attrs N/A href N/A link N/A url N/A N/A N/A link get description N/A N/A N/A N/A link N/A attrs N/A title N/A link N/A description N/A N/A N/A link get external False N/A N/A N/A N/A link N/A attrs N/A class N/A N/A N/A N/A join N/A N/A external-link N/A N/A N/A N/A N/A link N/A attrs get class split strip N/A N/A link N/A attrs N/A flatatt N/A link N/A attrs N/A N/A N/A new_children append link N/A N/A self children new_children N/A N/A self _initialized True N/A N/A AppList N/A DashboardModule AppListElementMixin N/A N/A 
    Module that lists installed apps and their models.
    As well as the :class:`~admin_tools.dashboard.modules.DashboardModule`
    properties, the :class:`~admin_tools.dashboard.modules.AppList`
    has two extra properties:

    ``models``
        A list of models to include, only models whose name (e.g.
        "blog.comments.models.Comment") match one of the strings (e.g.
        "blog.*") in the models list will appear in the dashboard module.

    ``exclude``
        A list of models to exclude, if a model name (e.g.
        "blog.comments.models.Comment") match an element of this list (e.g.
        "blog.comments.*") it won't appear in the dashboard module.

    If no models/exclude list is provided, **all apps** are shown.

    Here's a small example of building an app list module::

        from admin_tools.dashboard import modules, Dashboard

        class MyDashboard(Dashboard):
            def __init__(self, **kwargs):
                Dashboard.__init__(self, **kwargs)

                # will only list the django.contrib apps
                self.children.append(modules.AppList(
                    title='Administration',
                    models=('django.contrib.*',)
                ))
                # will list all apps except the django.contrib ones
                self.children.append(modules.AppList(
                    title='Applications',
                    exclude=('django.contrib.*',)
                ))

    The screenshot of what this code produces:

    .. image:: images/applist_dashboard_module.png

    .. note::

        Note that this module takes into account user permissions, for
        example, if a user has no rights to change or add a ``Group``, then
        the django.contrib.auth.Group model line will not be displayed.
     N/A title N/A _ Applications N/A template admin_tools/dashboard/modules/app_list.html N/A models None N/A exclude None N/A include_list None N/A exclude_list None __init__ N/A N/A self title N/A None kwargs N/A N/A N/A self models N/A list N/A N/A kwargs pop models N/A N/A N/A self exclude N/A list N/A N/A kwargs pop exclude N/A N/A N/A self include_list N/A N/A kwargs pop include_list N/A N/A N/A self exclude_list N/A N/A kwargs pop exclude_list N/A N/A N/A N/A N/A super AppList self __init__ title kwargs N/A init_with_context N/A N/A self context N/A N/A N/A N/A self _initialized N/A N/A N/A items N/A N/A self _visible_models N/A context N/A request N/A apps N/A N/A N/A model perms items N/A N/A app_label N/A N/A model _meta app_label N/A N/A app_label apps N/A N/A N/A apps N/A app_label N/A title url models N/A N/A N/A django_apps get_app_config app_label verbose_name N/A N/A self _get_admin_app_list_url model context N/A N/A model_dict N/A N/A N/A model_dict N/A title N/A N/A model _meta verbose_name_plural N/A N/A perms N/A change N/A N/A N/A model_dict N/A change_url N/A N/A self _get_admin_change_url model context N/A N/A perms N/A add N/A N/A N/A model_dict N/A add_url N/A N/A self _get_admin_add_url model context N/A N/A N/A N/A N/A apps N/A app_label N/A models append model_dict N/A app N/A sorted N/A N/A apps keys N/A N/A N/A N/A N/A N/A apps N/A app N/A models sort key N/A N/A N/A x N/A N/A x N/A title N/A N/A N/A N/A self children append N/A apps N/A app N/A N/A self _initialized True N/A N/A ModelList N/A DashboardModule AppListElementMixin N/A N/A 
    Module that lists a set of models.
    As well as the :class:`~admin_tools.dashboard.modules.DashboardModule`
    properties, the :class:`~admin_tools.dashboard.modules.ModelList` takes
    two extra arguments:

    ``models``
        A list of models to include, only models whose name (e.g.
        "blog.comments.models.Comment") match one of the strings (e.g.
        "blog.*") in the models list will appear in the dashboard module.

    ``exclude``
        A list of models to exclude, if a model name (e.g.
        "blog.comments.models.Comment") match an element of this list (e.g.
        "blog.comments.*") it won't appear in the dashboard module.

    Here's a small example of building a model list module::

        from admin_tools.dashboard import modules, Dashboard

        class MyDashboard(Dashboard):
            def __init__(self, **kwargs):
                Dashboard.__init__(self, **kwargs)

                # will only list the django.contrib.auth models
                self.children += [
                    modules.ModelList(
                        title='Authentication',
                        models=['django.contrib.auth.*',]
                    )
                ]

    The screenshot of what this code produces:

    .. image:: images/modellist_dashboard_module.png

    .. note::

        Note that this module takes into account user permissions, for
        example, if a user has no rights to change or add a ``Group``, then
        the django.contrib.auth.Group model line will not be displayed.
     N/A template admin_tools/dashboard/modules/model_list.html N/A models None N/A exclude None N/A include_list None N/A exclude_list None __init__ N/A N/A self title models exclude N/A None None None kwargs N/A N/A N/A self models N/A list N/A models N/A N/A N/A self exclude N/A list N/A exclude N/A N/A N/A self include_list N/A N/A kwargs pop include_list N/A N/A N/A self exclude_list N/A N/A kwargs pop exclude_list N/A N/A N/A extra kwargs N/A N/A N/A self extra N/A N/A kwargs pop extra N/A N/A N/A self extra N/A N/A N/A N/A N/A super ModelList self __init__ title kwargs N/A init_with_context N/A N/A self context N/A N/A N/A N/A self _initialized N/A N/A N/A items N/A N/A self _visible_models N/A context N/A request N/A N/A items N/A N/A N/A N/A model perms items N/A N/A model_dict N/A N/A N/A model_dict N/A title N/A N/A model _meta verbose_name_plural N/A N/A perms N/A change N/A N/A N/A model_dict N/A change_url N/A N/A self _get_admin_change_url model context N/A N/A perms N/A add N/A N/A N/A model_dict N/A add_url N/A N/A self _get_admin_add_url model context N/A N/A N/A N/A self children append model_dict N/A N/A self extra N/A N/A extra_url N/A self extra N/A N/A model_dict N/A N/A N/A model_dict N/A title N/A extra_url N/A title N/A N/A model_dict N/A change_url N/A extra_url N/A change_url N/A N/A model_dict N/A add_url N/A N/A extra_url get add_url None N/A N/A N/A N/A self children append model_dict N/A N/A self _initialized True N/A N/A RecentActions N/A DashboardModule N/A N/A 
    Module that lists the recent actions for the current user.
    As well as the :class:`~admin_tools.dashboard.modules.DashboardModule`
    properties, the :class:`~admin_tools.dashboard.modules.RecentActions`
    takes three extra keyword arguments:

    ``include_list``
        A list of contenttypes (e.g. "auth.group" or "sites.site") to include,
        only recent actions that match the given contenttypes will be
        displayed.

    ``exclude_list``
        A list of contenttypes (e.g. "auth.group" or "sites.site") to exclude,
        recent actions that match the given contenttypes will not be
        displayed.

    ``limit``
        The maximum number of children to display. Default value: 10.

    Here's a small example of building a recent actions module::

        from admin_tools.dashboard import modules, Dashboard

        class MyDashboard(Dashboard):
            def __init__(self, **kwargs):
                Dashboard.__init__(self, **kwargs)

                # will only list the django.contrib apps
                self.children.append(modules.RecentActions(
                    title='Django CMS recent actions',
                    include_list=('cms.page', 'cms.cmsplugin',)
                ))

    The screenshot of what this code produces:

    .. image:: images/recentactions_dashboard_module.png
     N/A title N/A _ Recent Actions N/A template admin_tools/dashboard/modules/recent_actions.html N/A limit 10 N/A include_list None N/A exclude_list None __init__ N/A N/A self title limit include_list exclude_list N/A None 10 None None kwargs N/A N/A N/A self include_list N/A include_list N/A N/A N/A self exclude_list N/A exclude_list N/A N/A N/A N/A kwargs update N/A limit limit N/A N/A N/A N/A super RecentActions self __init__ title kwargs N/A init_with_context N/A N/A self context N/A N/A N/A N/A self _initialized N/A N/A django.db.models Q django.contrib.admin.models LogEntry N/A request N/A context N/A request get_qset N/A N/A list N/A N/A django.contrib.contenttypes.models ContentType N/A qset None N/A contenttype list N/A N/A N/A isinstance contenttype ContentType N/A N/A current_qset N/A Q content_type__id N/A contenttype id N/A N/A N/A N/A N/A app_label model N/A N/A contenttype split . N/A N/A N/A N/A N/A ValueError N/A Invalid contenttype: "%s" contenttype N/A current_qset N/A Q content_type__app_label app_label content_type__model model N/A N/A qset None N/A N/A qset current_qset N/A N/A qset N/A qset current_qset N/A qset N/A N/A N/A N/A request user None N/A N/A qs N/A N/A N/A LogEntry objects all N/A N/A qs N/A N/A N/A LogEntry objects filter user__id__exact N/A N/A request user id N/A N/A self include_list N/A N/A qs N/A N/A qs filter N/A get_qset N/A self include_list N/A N/A self exclude_list N/A N/A qs N/A N/A qs exclude N/A get_qset N/A self exclude_list N/A N/A self children N/A N/A N/A qs select_related content_type user N/A N/A self limit N/A N/A N/A len N/A self children N/A N/A N/A self pre_content N/A _ No recent actions. N/A N/A self _initialized True N/A N/A Feed N/A DashboardModule N/A N/A 
    Class that represents a feed dashboard module.

    .. important::

        This class uses the
        `Universal Feed Parser module <http://www.feedparser.org/>`_ to parse
        the feeds, so you'll need to install it, all feeds supported by
        FeedParser are thus supported by the Feed

    As well as the :class:`~admin_tools.dashboard.modules.DashboardModule`
    properties, the :class:`~admin_tools.dashboard.modules.Feed` takes two
    extra keyword arguments:

    ``feed_url``
        The URL of the feed.

    ``limit``
        The maximum number of feed children to display. Default value: None,
        which means that all children are displayed.

    Here's a small example of building a recent actions module::

        from admin_tools.dashboard import modules, Dashboard

        class MyDashboard(Dashboard):
            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
                ))

    The screenshot of what this code produces:

    .. image:: images/feed_dashboard_module.png
     N/A title N/A _ RSS Feed N/A template admin_tools/dashboard/modules/feed.html N/A feed_url None N/A limit None __init__ N/A N/A self title feed_url limit N/A None None None kwargs N/A N/A N/A N/A kwargs update N/A feed_url limit feed_url limit N/A N/A N/A N/A super Feed self __init__ title kwargs N/A init_with_context N/A N/A self context N/A N/A N/A N/A self _initialized N/A N/A N/A datetime N/A N/A N/A self feed_url None N/A N/A N/A ValueError You must provide a valid feed URL N/A N/A N/A feedparser N/A N/A N/A ImportError N/A N/A N/A N/A N/A self children append N/A title warning You must install the FeedParser python module True N/A N/A feed N/A N/A feedparser parse N/A self feed_url N/A N/A N/A self limit None N/A N/A entries N/A N/A feed N/A entries N/A N/A self limit N/A N/A entries N/A feed N/A entries N/A entry entries N/A N/A N/A entry url N/A entry link N/A N/A N/A N/A entry date N/A N/A datetime date N/A N/A entry published_parsed N/A 0 3 N/A N/A N/A N/A N/A N/A N/A N/A self children append entry N/A N/A self _initialized True N/A N/A