Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master #483

Open
wants to merge 20 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Django JET
| |
| Developing of new features for Django Jet will be frozen, only critical bugs will be fixed. |
+-----------------------------------------------------------------------------------------------------------------------------------+
| `Live Demo <https://app.jetadmin.io/demo?utm_source=jet&utm_medium=banner&utm_campaign=github&utm_content=link&utm_term=promo>`_ |
| `Live Demo <https://github.com/jet-admin/jet-bridge>`_ |
+-----------------------------------------------------------------------------------------------------------------------------------+


Expand Down
20 changes: 11 additions & 9 deletions docs/dashboard_custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ Custom Dashboard

.. 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
django-admin-tools modules could be easily ported to Django JET. In most cases it 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``
Dashboard represents ``Dashboard`` class instances with ``DashboardModule`` class instances as its children.
Any custom **Dashboard** class should inherit from ``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.
to the ``children`` and ``available_children`` attributes.

Before continue make sure you have completed :doc:`install_dashboard`.
Before you continue, make sure you have completed the :doc:`install_dashboard`.

Set Up Custom Dashboard
-----------------------
Expand Down Expand Up @@ -55,12 +55,14 @@ Set Up Custom Dashboard
))


* Add to your settings.py path to created ``dashboard.py`` (example for ``dashboard.py`` in project root):
* Add the path to your ``dashboard.py`` in your ``settings.py`` file. For example, if your
``dashboard.py`` is in the 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 :doc:`dashboard_custom_module` to create your own.
That's all, now you have a dashboard with only one widget - ``LinkList``. Dashboard reset may be needed
if you had another dashboard already rendered for any user. Visit :doc:`dashboard_modules` to learn
about other widgets you can add to your custom dashboard or :doc:`dashboard_custom_module` or to create
your own.
2 changes: 1 addition & 1 deletion jet/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '1.0.7'
VERSION = '1.0.8'
4 changes: 2 additions & 2 deletions jet/dashboard/templates/jet.dashboard/module.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>

<div class="dashboard-item-content{% if module.contrast %} contrast{% endif %}"{% if module.style %} style="{{ module.style }}"{% endif %}>
{{ module.pre_contenta|default_if_none:"" }}
{{ module.pre_content|default_if_none:"" }}
{% if module.ajax_load %}
<div class="loading-indicator-wrapper">
<span class="icon-refresh loading-indicator"></span>
Expand All @@ -38,4 +38,4 @@
{% endif %}
{{ module.post_content|default_if_none:"" }}
</div>
</div>
</div>