瀏覽代碼

Merge branch 'dev'

Denis K 9 年之前
父節點
當前提交
502540bbd6

+ 2 - 1
docs/autocomplete.rst

@@ -37,4 +37,5 @@ Example from Django JET demo site:
 
 
 Now all your admin select boxes will perform AJAX queries to load available options while you type.
 Now all your admin select boxes will perform AJAX queries to load available options while you type.
 
 
-.. note:: This work for both ForeignKey and ManyToManyField fields.
+.. note::
+    This work for both ForeignKey and ManyToManyField fields.

+ 3 - 1
docs/conf.py

@@ -19,7 +19,9 @@ import shlex
 # If extensions (or modules to document with autodoc) are in another directory,
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
 # documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
+sys.path.insert(0, os.path.abspath('..'))
+from django.conf import settings
+settings.configure()
 
 
 # -- General configuration ------------------------------------------------
 # -- General configuration ------------------------------------------------
 
 

+ 3 - 2
docs/config_file.rst

@@ -14,7 +14,8 @@ Possible built-in themes are:
 * default
 * default
 * green
 * green
 
 
-.. note:: More themes are incoming in future.
+.. note::
+    More themes are incoming in future.
 
 
 To change theme use parameter:
 To change theme use parameter:
 
 
@@ -48,5 +49,5 @@ Same as **JET_INDEX_DASHBOARD**, but for application pages
 
 
 .. code:: python
 .. code:: python
 
 
-    JET_APP_INDEX_DASHBOARD = g'jet.dashboard.DefaultAppIndexDashboard'
+    JET_APP_INDEX_DASHBOARD = 'jet.dashboard.DefaultAppIndexDashboard'
 
 

+ 5 - 4
docs/dashboard.rst

@@ -2,8 +2,9 @@
 Dashboard
 Dashboard
 =========
 =========
 
 
-Django JET Dashboard tries to be as compatible as possible with django-admin-tools dashboard so that
-django-admint-tools modules could be easily ported to Django JET. In most cases in will be enough to
-change python imports in dashboard.py and remove extending in modules templates.
+.. toctree::
+   :maxdepth: 2
 
 
-More info incoming.
+   dashboard_getting_started
+   dashboard_modules
+   dashboard_base

+ 11 - 0
docs/dashboard_base.rst

@@ -0,0 +1,11 @@
+============
+Base Classes
+============
+
+.. _Dashboard:
+.. autoclass:: jet.dashboard.dashboard.Dashboard
+   :members:
+
+.. _Dashboard Module:
+.. autoclass:: jet.dashboard.modules.DashboardModule
+   :members:

+ 65 - 0
docs/dashboard_getting_started.rst

@@ -0,0 +1,65 @@
+===============
+Getting Started
+===============
+
+.. note::
+   Django JET Dashboard tries to be as compatible as possible with django-admin-tools dashboard so that
+   django-admin-tools modules could be easily ported to Django JET. In most cases in will be enough to
+   change python imports and remove extending in modules templates.
+
+Dashboard represents ``Dashboard`` class instance with ``DashboardModule`` class instances as its children.
+Any custom **Dashboard** class should inherit ``jet.dashboard.dashboard.Dashboard``
+and use ``init_with_context`` to fill it with widgets. You should add your widgets
+to ``children`` and ``available_children`` attributes.
+
+
+Set Up Custom Dashboard
+-----------------------
+
+* Create ``dashboard.py`` in any suitable location (e.g., in your project root) with the following content:
+
+   .. code-block:: python
+
+      from django.utils.translation import ugettext_lazy as _
+      from jet.dashboard import modules
+      from jet.dashboard.dashboard import Dashboard, AppIndexDashboard
+
+
+      class CustomIndexDashboard(Dashboard):
+          columns = 3
+
+          def init_with_context(self, context):
+              self.available_children.append(modules.LinkList)
+              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,
+                      },
+                  ],
+                  column=0,
+                  order=0
+              ))
+
+
+* Add to your settings.py path to created ``dashboard.py`` (example for ``dashboard.py`` in project root):
+
+.. code:: python
+
+    JET_INDEX_DASHBOARD = 'dashboard.CustomIndexDashboard'
+
+That's all, now you have dashboard with only one widget - ``LinkList``. Dashboard reset may be needed
+if your had another dashboard already rendered for any user. Visit :doc:`dashboard_modules` to learn
+other widgets you can add to your custom dashboard or create your own.

+ 139 - 0
docs/dashboard_modules.rst

@@ -0,0 +1,139 @@
+=================
+Dashboard modules
+=================
+
+Build-in dashboard modules
+==========================
+
+LinkList
+--------
+
+.. autoclass:: jet.dashboard.modules.LinkList
+   :members:
+
+AppList
+-------
+
+.. autoclass:: jet.dashboard.modules.AppList
+   :members:
+
+ModelList
+---------
+
+.. autoclass:: jet.dashboard.modules.ModelList
+   :members:
+
+RecentActions
+-------------
+
+.. autoclass:: jet.dashboard.modules.RecentActions
+   :members:
+
+Feed
+----
+
+.. autoclass:: jet.dashboard.modules.Feed
+   :members:
+
+Google Analytics widgets
+========================
+
+.. attention::
+   Google Analytics widgets required extra setup
+
+Extra Installation
+------------------
+
+* Install python package:
+
+.. code::
+
+   pip install google-api-python-client
+
+* Specify path to your Google Analytics ``client_secrets.json`` (obtained at Google website):
+
+.. code::
+
+   JET_MODULE_GOOGLE_ANALYTICS_CLIENT_SECRETS_FILE = os.path.join(PROJECT_DIR, 'client_secrets.json')
+
+* Add import to the top of your urls.py:
+
+.. code::
+
+   from jet.dashboard.dashboard_modules import google_analytics_views
+
+
+Usage example
+-------------
+   .. code-block:: python
+
+     from django.utils.translation import ugettext_lazy as _
+     from jet.dashboard.dashboard import Dashboard, AppIndexDashboard
+     from jet.dashboard.dashboard_modules import google_analytics
+
+
+     class CustomIndexDashboard(Dashboard):
+         columns = 3
+
+         def init_with_context(self, context):
+            self.available_children.append(google_analytics.GoogleAnalyticsVisitorsTotals)
+            self.available_children.append(google_analytics.GoogleAnalyticsVisitorsChart)
+            self.available_children.append(google_analytics.GoogleAnalyticsPeriodVisitors)
+
+.. autoclass:: jet.dashboard.dashboard_modules.google_analytics.GoogleAnalyticsVisitorsTotals
+   :members:
+
+.. autoclass:: jet.dashboard.dashboard_modules.google_analytics.GoogleAnalyticsVisitorsChart
+   :members:
+
+.. autoclass:: jet.dashboard.dashboard_modules.google_analytics.GoogleAnalyticsPeriodVisitors
+   :members:
+
+Yandex Metrika widgets
+======================
+
+.. attention::
+   Yandex Metrika widgets required extra setup
+
+Extra Installation
+------------------
+
+* Set your Yandex Metrika CLIENT_ID and CLIENT_SECRET (obtained at Yandex Metrika API website):
+
+.. code::
+
+   JET_MODULE_YANDEX_METRIKA_CLIENT_ID = 'YANDEX_METRIKA_CLIENT_ID'
+   JET_MODULE_YANDEX_METRIKA_CLIENT_SECRET = 'YANDEX_METRIKA_CLIENT_SECRET'
+
+* Add import to the top of your urls.py:
+
+.. code::
+
+   from jet.dashboard.dashboard_modules import yandex_metrika_views
+
+
+Usage example
+-------------
+   .. code-block:: python
+
+     from django.utils.translation import ugettext_lazy as _
+     from jet.dashboard.dashboard import Dashboard, AppIndexDashboard
+     from jet.dashboard.dashboard_modules import yandex_metrika
+
+
+     class CustomIndexDashboard(Dashboard):
+         columns = 3
+
+         def init_with_context(self, context):
+            self.available_children.append(yandex_metrika.YandexMetrikaVisitorsTotals)
+            self.available_children.append(yandex_metrika.YandexMetrikaVisitorsChart)
+            self.available_children.append(yandex_metrika.YandexMetrikaPeriodVisitors)
+
+.. autoclass:: jet.dashboard.dashboard_modules.yandex_metrika.YandexMetrikaVisitorsTotals
+   :members:
+
+.. autoclass:: jet.dashboard.dashboard_modules.yandex_metrika.YandexMetrikaVisitorsChart
+   :members:
+
+.. autoclass:: jet.dashboard.dashboard_modules.yandex_metrika.YandexMetrikaPeriodVisitors
+   :members:

+ 4 - 3
docs/install.rst

@@ -2,9 +2,10 @@
 Installation
 Installation
 ============
 ============
 
 
-.. note:: After following this instruction Django JET dashboard won't be active (as it is located into
-          a separate application). If you want to make it work, you will have to enable dashboard application
-          by following :doc:`install_dashboard` steps too.
+.. note::
+    After following this instruction Django JET dashboard won't be active (as it is located into
+    a separate application). If you want to make it work, you will have to enable dashboard application
+    by following :doc:`install_dashboard` steps too.
 
 
 * Download and install latest version of Django JET:
 * Download and install latest version of Django JET:
 
 

+ 4 - 2
docs/install_dashboard.rst

@@ -2,8 +2,9 @@
 Dashboard installation
 Dashboard installation
 ======================
 ======================
 
 
-.. note:: Dashboard is located into a separate application. So after a typical JET installation it won't be active.
-          To enable dashboard application follow these steps:
+.. note::
+    Dashboard is located into a separate application. So after a typical JET installation it won't be active.
+    To enable dashboard application follow these steps:
 
 
 * Add 'jet.dashboard' application to the INSTALLED_APPS setting of your Django project settings.py file (note it should be before 'jet'):
 * Add 'jet.dashboard' application to the INSTALLED_APPS setting of your Django project settings.py file (note it should be before 'jet'):
 
 
@@ -49,3 +50,4 @@ Dashboard installation
 
 
         python manage.py collectstatic
         python manage.py collectstatic
 
 
+Dashboard installed! Learn about making your custom dashboard here :doc:`dashboard`.

+ 56 - 0
jet/dashboard/dashboard.py

@@ -10,8 +10,22 @@ from jet.utils import get_admin_site_name
 
 
 
 
 class Dashboard(object):
 class Dashboard(object):
+    """
+    Base dashboard class. All custom dashboards should inherit it.
+    """
+
+    #: Number of columns in which widgets can be placed
     columns = 2
     columns = 2
+
+    #: Dashboard Modules (widgets) that dashboard is filled with, when the user open it for the first time
+    #:
+    #: List of dashboard module **instances**
     children = None
     children = None
+
+    #: Dashboard Modules (widgets) that user can add to dashboard at any time
+    # (not created when the user open dashboard for the first time)
+    #:
+    #: List of dashboard module **classes**
     available_children = None
     available_children = None
     app_label = None
     app_label = None
     context = None
     context = None
@@ -35,6 +49,48 @@ class Dashboard(object):
         self.load_modules()
         self.load_modules()
 
 
     def init_with_context(self, context):
     def init_with_context(self, context):
+        """
+        Override this method to fill your custom **Dashboard** class with widgets.
+        You should add your widgets to ``children`` and ``available_children`` attributes.
+
+        Usage example:
+
+        .. code-block:: python
+
+            from django.utils.translation import ugettext_lazy as _
+            from jet.dashboard import modules
+            from jet.dashboard.dashboard import Dashboard, AppIndexDashboard
+
+
+            class CustomIndexDashboard(Dashboard):
+                columns = 3
+
+                def init_with_context(self, context):
+                    self.available_children.append(modules.LinkList)
+                    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,
+                            },
+                        ],
+                        column=0,
+                        order=0
+                    ))
+
+        """
         pass
         pass
 
 
     def load_module(self, module_fullname):
     def load_module(self, module_fullname):

+ 32 - 0
jet/dashboard/dashboard_modules/google_analytics.py

@@ -302,9 +302,17 @@ class GoogleAnalyticsBase(DashboardModule):
 
 
 
 
 class GoogleAnalyticsVisitorsTotals(GoogleAnalyticsBase):
 class GoogleAnalyticsVisitorsTotals(GoogleAnalyticsBase):
+    """
+    Google Analytics widget that shows total number of users, sessions and viewers for a particular period of time.
+    Period may be following: Today, Last week, Last month, Last quarter, Last year
+    """
+
     title = _('Google Analytics visitors totals')
     title = _('Google Analytics visitors totals')
     template = 'jet.dashboard/modules/google_analytics_visitors_totals.html'
     template = 'jet.dashboard/modules/google_analytics_visitors_totals.html'
 
 
+    #: Which period should be displayed. Allowed values - integer of days
+    period = None
+
     def __init__(self, title=None, period=None, **kwargs):
     def __init__(self, title=None, period=None, **kwargs):
         kwargs.update({'period': period})
         kwargs.update({'period': period})
         super(GoogleAnalyticsVisitorsTotals, self).__init__(title, **kwargs)
         super(GoogleAnalyticsVisitorsTotals, self).__init__(title, **kwargs)
@@ -322,10 +330,23 @@ class GoogleAnalyticsVisitorsTotals(GoogleAnalyticsBase):
 
 
 
 
 class GoogleAnalyticsVisitorsChart(GoogleAnalyticsBase):
 class GoogleAnalyticsVisitorsChart(GoogleAnalyticsBase):
+    """
+    Google Analytics widget that shows users/sessions/viewer chart for a particular period of time.
+    Data is grouped by day, week or month
+    Period may be following: Today, Last week, Last month, Last quarter, Last year
+    """
+
     title = _('Google Analytics visitors chart')
     title = _('Google Analytics visitors chart')
     template = 'jet.dashboard/modules/google_analytics_visitors_chart.html'
     template = 'jet.dashboard/modules/google_analytics_visitors_chart.html'
     style = 'overflow-x: auto;'
     style = 'overflow-x: auto;'
+
+    #: Which period should be displayed. Allowed values - integer of days
+    period = None
+
+    #: What data should be shown. Possible values: ``ga:users``, ``ga:sessions``, ``ga:pageviews``
     show = None
     show = None
+
+    #: Sets grouping of data. Possible values: ``day``, ``week``, ``month``
     group = None
     group = None
     settings_form = GoogleAnalyticsChartSettingsForm
     settings_form = GoogleAnalyticsChartSettingsForm
 
 
@@ -367,8 +388,19 @@ class GoogleAnalyticsVisitorsChart(GoogleAnalyticsBase):
 
 
 
 
 class GoogleAnalyticsPeriodVisitors(GoogleAnalyticsBase):
 class GoogleAnalyticsPeriodVisitors(GoogleAnalyticsBase):
+    """
+    Google Analytics widget that shows users, sessions and viewers for a particular period of time.
+    Data is grouped by day, week or month
+    Period may be following: Today, Last week, Last month, Last quarter, Last year
+    """
+
     title = _('Google Analytics period visitors')
     title = _('Google Analytics period visitors')
     template = 'jet.dashboard/modules/google_analytics_period_visitors.html'
     template = 'jet.dashboard/modules/google_analytics_period_visitors.html'
+
+    #: Which period should be displayed. Allowed values - integer of days
+    period = None
+
+    #: Sets grouping of data. Possible values: ``day``, ``week``, ``month``
     group = None
     group = None
     contrast = False
     contrast = False
     settings_form = GoogleAnalyticsPeriodVisitorsSettingsForm
     settings_form = GoogleAnalyticsPeriodVisitorsSettingsForm

+ 32 - 0
jet/dashboard/dashboard_modules/yandex_metrika.py

@@ -241,9 +241,17 @@ class YandexMetrikaBase(DashboardModule):
 
 
 
 
 class YandexMetrikaVisitorsTotals(YandexMetrikaBase):
 class YandexMetrikaVisitorsTotals(YandexMetrikaBase):
+    """
+    Yandex Metrika widget that shows total number of visitors, visits and viewers for a particular period of time.
+    Period may be following: Today, Last week, Last month, Last quarter, Last year
+    """
+
     title = _('Yandex Metrika visitors totals')
     title = _('Yandex Metrika visitors totals')
     template = 'jet.dashboard/modules/yandex_metrika_visitors_totals.html'
     template = 'jet.dashboard/modules/yandex_metrika_visitors_totals.html'
 
 
+    #: Which period should be displayed. Allowed values - integer of days
+    period = None
+
     def __init__(self, title=None, period=None, **kwargs):
     def __init__(self, title=None, period=None, **kwargs):
         kwargs.update({'period': period})
         kwargs.update({'period': period})
         super(YandexMetrikaVisitorsTotals, self).__init__(title, **kwargs)
         super(YandexMetrikaVisitorsTotals, self).__init__(title, **kwargs)
@@ -261,10 +269,23 @@ class YandexMetrikaVisitorsTotals(YandexMetrikaBase):
 
 
 
 
 class YandexMetrikaVisitorsChart(YandexMetrikaBase):
 class YandexMetrikaVisitorsChart(YandexMetrikaBase):
+    """
+    Yandex Metrika widget that shows visitors/visits/viewer chart for a particular period of time.
+    Data is grouped by day, week or month
+    Period may be following: Today, Last week, Last month, Last quarter, Last year
+    """
+
     title = _('Yandex Metrika visitors chart')
     title = _('Yandex Metrika visitors chart')
     template = 'jet.dashboard/modules/yandex_metrika_visitors_chart.html'
     template = 'jet.dashboard/modules/yandex_metrika_visitors_chart.html'
     style = 'overflow-x: auto;'
     style = 'overflow-x: auto;'
+
+    #: Which period should be displayed. Allowed values - integer of days
+    period = None
+
+    #: What data should be shown. Possible values: ``visitors``, ``visits``, ``page_views``
     show = None
     show = None
+
+    #: Sets grouping of data. Possible values: ``day``, ``week``, ``month``
     group = None
     group = None
     settings_form = YandexMetrikaChartSettingsForm
     settings_form = YandexMetrikaChartSettingsForm
 
 
@@ -300,8 +321,19 @@ class YandexMetrikaVisitorsChart(YandexMetrikaBase):
 
 
 
 
 class YandexMetrikaPeriodVisitors(YandexMetrikaBase):
 class YandexMetrikaPeriodVisitors(YandexMetrikaBase):
+    """
+    Yandex Metrika widget that shows visitors, visits and viewers for a particular period of time.
+    Data is grouped by day, week or month
+    Period may be following: Today, Last week, Last month, Last quarter, Last year
+    """
+
     title = _('Yandex Metrika period visitors')
     title = _('Yandex Metrika period visitors')
     template = 'jet.dashboard/modules/yandex_metrika_period_visitors.html'
     template = 'jet.dashboard/modules/yandex_metrika_period_visitors.html'
+
+    #: Which period should be displayed. Allowed values - integer of days
+    period = None
+
+    #: Sets grouping of data. Possible values: ``day``, ``week``, ``month``
     group = None
     group = None
     contrast = False
     contrast = False
     settings_form = YandexMetrikaPeriodVisitorsSettingsForm
     settings_form = YandexMetrikaPeriodVisitorsSettingsForm

+ 212 - 0
jet/dashboard/modules.py

@@ -9,27 +9,50 @@ import datetime
 
 
 
 
 class DashboardModule(object):
 class DashboardModule(object):
+    """
+    Base dashboard module class. All dashboard modules (widgets) should inherit it.
+    """
+
+    #: Path to widget's template. There is no need to extend such templates from any base templates.
     template = 'jet.dashboard/module.html'
     template = 'jet.dashboard/module.html'
     enabled = True
     enabled = True
     draggable = True
     draggable = True
     collapsible = True
     collapsible = True
     deletable = True
     deletable = True
     show_title = True
     show_title = True
+
+    #: Default widget title that will be displayed for widget in the dashboard. User can change it later
+    #: for every widget.
     title = ''
     title = ''
     title_url = None
     title_url = None
     css_classes = None
     css_classes = None
+
+    #: HTML content that will be displayed before widget content.
     pre_content = None
     pre_content = None
+
+    #: HTML content that will be displayed after widget content.
     post_content = None
     post_content = None
     children = None
     children = None
+
+    #: A ``django.forms.Form`` class which may contain custom widget settings. Not required.
     settings_form = None
     settings_form = None
+
+    #: A ``django.forms.Form`` class which may contain custom widget child settings, if it has any. Not required.
     child_form = None
     child_form = None
     child_name = None
     child_name = None
     child_name_plural = None
     child_name_plural = None
     settings = None
     settings = None
     column = None
     column = None
     order = None
     order = None
+
+    #: A boolean field which specify if widget should be rendered on dashboard page load or fetched
+    #: later via AJAX.
     ajax_load = False
     ajax_load = False
+
+    #: A boolean field which makes widget ui color contrast.
     contrast = False
     contrast = False
+
+    #: Optional style attributes which will be applied to widget content container.
     style = False
     style = False
 
 
     class Media:
     class Media:
@@ -122,9 +145,69 @@ class LinkListSettingsForm(forms.Form):
 
 
 
 
 class LinkList(DashboardModule):
 class LinkList(DashboardModule):
+    """
+    List of links widget.
+
+    Usage example:
+
+    .. code-block:: python
+
+        from django.utils.translation import ugettext_lazy as _
+        from jet.dashboard import modules
+        from jet.dashboard.dashboard import Dashboard, AppIndexDashboard
+
+
+        class CustomIndexDashboard(Dashboard):
+            columns = 3
+
+            def init_with_context(self, context):
+                self.available_children.append(modules.LinkList)
+                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,
+                        },
+                    ],
+                    column=0,
+                    order=0
+                ))
+
+    """
+
     title = _('Links')
     title = _('Links')
     template = 'jet.dashboard/modules/link_list.html'
     template = 'jet.dashboard/modules/link_list.html'
+
+    #: Specify widget layout.
+    #: Allowed values ``stacked`` and ``inline``.
     layout = 'stacked'
     layout = 'stacked'
+
+    #: Links are contained in ``children`` attribute which you can pass as constructor parameter
+    #: to make your own preinstalled link lists.
+    #:
+    #: ``children`` is an array of dictinaries::
+    #:
+    #:     [
+    #:          {
+    #:              'title': _('Django documentation'),
+    #:              'url': 'http://docs.djangoproject.com/',
+    #:              'external': True,
+    #:          },
+    #:          ...
+    #:     ]
+    children = []
     settings_form = LinkListSettingsForm
     settings_form = LinkListSettingsForm
     child_form = LinkListItemForm
     child_form = LinkListItemForm
     child_name = _('Link')
     child_name = _('Link')
@@ -157,9 +240,40 @@ class LinkList(DashboardModule):
 
 
 
 
 class AppList(DashboardModule):
 class AppList(DashboardModule):
+    """
+    Shows applications and containing models links. For each model "created" and "change" links are displayed.
+
+    Usage example:
+
+    .. code-block:: python
+
+        from django.utils.translation import ugettext_lazy as _
+        from jet.dashboard import modules
+        from jet.dashboard.dashboard import Dashboard, AppIndexDashboard
+
+
+        class CustomIndexDashboard(Dashboard):
+            columns = 3
+
+            def init_with_context(self, context):
+                self.children.append(modules.AppList(
+                    _('Applications'),
+                    exclude=('auth.*',),
+                    column=0,
+                    order=0
+                ))
+
+    """
+
     title = _('Applications')
     title = _('Applications')
     template = 'jet.dashboard/modules/app_list.html'
     template = 'jet.dashboard/modules/app_list.html'
+
+    #: Specify models which should be displayed. ``models`` is an array of string formatted as ``app_label.model``.
+    #: Also its possible to specify all application models with * sign (e.g. ``auth.*``).
     models = None
     models = None
+
+    #: Specify models which should NOT be displayed. ``exclude`` is an array of string formatted as ``app_label.model``.
+    #: Also its possible to specify all application models with * sign (e.g. ``auth.*``).
     exclude = None
     exclude = None
     hide_empty = True
     hide_empty = True
 
 
@@ -198,9 +312,40 @@ class AppList(DashboardModule):
 
 
 
 
 class ModelList(DashboardModule):
 class ModelList(DashboardModule):
+    """
+    Shows models links. For each model "created" and "change" links are displayed.
+
+    Usage example:
+
+    .. code-block:: python
+
+        from django.utils.translation import ugettext_lazy as _
+        from jet.dashboard import modules
+        from jet.dashboard.dashboard import Dashboard, AppIndexDashboard
+
+
+        class CustomIndexDashboard(Dashboard):
+            columns = 3
+
+            def init_with_context(self, context):
+                self.children.append(modules.ModelList(
+                    _('Models'),
+                    exclude=('auth.*',),
+                    column=0,
+                    order=0
+                ))
+
+    """
+
     title = _('Models')
     title = _('Models')
     template = 'jet.dashboard/modules/model_list.html'
     template = 'jet.dashboard/modules/model_list.html'
+
+    #: Specify models which should be displayed. ``models`` is an array of string formatted as ``app_label.model``.
+    #: Also its possible to specify all application models with * sign (e.g. ``auth.*``).
     models = None
     models = None
+
+    #: Specify models which should NOT be displayed. ``exclude`` is an array of string formatted as ``app_label.model``.
+    #: Also its possible to specify all application models with * sign (e.g. ``auth.*``).
     exclude = None
     exclude = None
     hide_empty = True
     hide_empty = True
 
 
@@ -239,10 +384,46 @@ class RecentActionsSettingsForm(forms.Form):
 
 
 
 
 class RecentActions(DashboardModule):
 class RecentActions(DashboardModule):
+    """
+    Display list of most recent admin actions with following information:
+    entity name, type of action, author, date
+
+    Usage example:
+
+    .. code-block:: python
+
+        from django.utils.translation import ugettext_lazy as _
+        from jet.dashboard import modules
+        from jet.dashboard.dashboard import Dashboard, AppIndexDashboard
+
+
+        class CustomIndexDashboard(Dashboard):
+            columns = 3
+
+            def init_with_context(self, context):
+                self.children.append(modules.RecentActions(
+                    _('Recent Actions'),
+                    10,
+                    column=0,
+                    order=0
+                ))
+
+    """
+
     title = _('Recent Actions')
     title = _('Recent Actions')
     template = 'jet.dashboard/modules/recent_actions.html'
     template = 'jet.dashboard/modules/recent_actions.html'
+
+    #: Number if entries to be shown (may be changed by each user personally).
     limit = 10
     limit = 10
+
+    #: Specify actions of which models should be displayed. ``include_list`` is an array of string
+    #: formatted as ``app_label.model``. Also its possible to specify all application models
+    #: with * sign (e.g. ``auth.*``).
     include_list = None
     include_list = None
+
+    #: Specify actions of which models should NOT be displayed. ``exclude_list`` is an array of string
+    #: formatted as ``app_label.model``. Also its possible to specify all application models
+    #: with * sign (e.g. ``auth.*``).
     exclude_list = None
     exclude_list = None
     settings_form = RecentActionsSettingsForm
     settings_form = RecentActionsSettingsForm
     user = None
     user = None
@@ -311,9 +492,40 @@ class FeedSettingsForm(forms.Form):
 
 
 
 
 class Feed(DashboardModule):
 class Feed(DashboardModule):
+    """
+    Display RSS Feed entries with following information:
+    entry title, date and link to the full version
+
+    Usage example:
+
+    .. code-block:: python
+
+        from django.utils.translation import ugettext_lazy as _
+        from jet.dashboard import modules
+        from jet.dashboard.dashboard import Dashboard, AppIndexDashboard
+
+
+        class CustomIndexDashboard(Dashboard):
+            columns = 3
+
+            def init_with_context(self, context):
+                self.children.append(modules.Feed(
+                    _('Latest Django News'),
+                    feed_url='http://www.djangoproject.com/rss/weblog/',
+                    limit=5,
+                    column=0,
+                    order=0
+                ))
+
+    """
+
     title = _('RSS Feed')
     title = _('RSS Feed')
     template = 'jet.dashboard/modules/feed.html'
     template = 'jet.dashboard/modules/feed.html'
+
+    #: URL of the RSS feed (may be changed by each user personally).
     feed_url = None
     feed_url = None
+
+    #: Number if entries to be shown (may be changed by each user personally).
     limit = None
     limit = None
     settings_form = FeedSettingsForm
     settings_form = FeedSettingsForm
     ajax_load = True
     ajax_load = True