Skip to content

Commit 8d8af6a

Browse files
committed
Improve docs through additional linking and descriptions
Now that Panels can be easily linked, do so thorughout changes.rst. Improve JavaScript argument documentation by listing them inline.
1 parent 0d8b239 commit 8d8af6a

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

docs/changes.rst

+22-15
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ Change log
1616
* Started running Selenium tests on Travis CI.
1717
* Added a system check which prevents using django-debug-toolbar without
1818
any enabled panels.
19-
* Added :func:`Panel.run_checks <debug_toolbar.panels.Panel.run_checks>`
20-
for panels to verify the configuration before the application starts.
19+
* Added :meth:`Panel.run_checks() <debug_toolbar.panels.Panel.run_checks>` for
20+
panels to verify the configuration before the application starts.
2121
* Validate the static file paths specified in ``STATICFILES_DIRS``
22-
exist via :class:`StaticFilesPanel <debug_toolbar.panels.staticfiles.StaticFilesPanel>`
22+
exist via :class:`~debug_toolbar.panels.staticfiles.StaticFilesPanel`
2323
* Introduced `prettier <https://prettier.io/>`__ to format the frontend
2424
code.
2525
* Started accessing history views using GET requests since they do not
@@ -62,15 +62,17 @@ Change log
6262
``localStorage``.
6363
* Updated the code to avoid a few deprecation warnings and resource warnings.
6464
* Started loading JavaScript as ES6 modules.
65-
* Added support for ``cache.touch()`` when using django-debug-toolbar.
65+
* Added support for :meth:`cache.touch() <django.core.caches.cache.touch>` when
66+
using django-debug-toolbar.
6667
* Eliminated more inline CSS.
6768
* Updated ``tox.ini`` and ``Makefile`` to use isort>=5.
6869
* Increased RESULTS_CACHE_SIZE to 25 to better support AJAX requests.
6970
* Fixed the close button CSS by explicitly specifying the
7071
``box-sizing`` property.
7172
* Simplified the ``isort`` configuration by taking advantage of isort's
7273
``black`` profile.
73-
* Added HistoryPanel including support for AJAX requests.
74+
* Added :class:`~debug_toolbar.panels.history.HistoryPanel` including support
75+
for AJAX requests.
7476

7577
**Backwards incompatible changes**
7678
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -105,10 +107,13 @@ Change log
105107
2.0 (2019-06-20)
106108
----------------
107109

108-
* Updated ``StaticFilesPanel`` to be compatible with Django 3.0.
109-
* The ``ProfilingPanel`` is now enabled but inactive by default.
110+
* Updated :class:`~debug_toolbar.panels.staticfiles.StaticFilesPanel` to be
111+
compatible with Django 3.0.
112+
* The :class:`~debug_toolbar.panels.profiling.ProfilingPanel` is now enabled
113+
but inactive by default.
110114
* Fixed toggling of table rows in the profiling panel UI.
111-
* The ``ProfilingPanel`` no longer skips remaining panels or middlewares.
115+
* The :class:`~debug_toolbar.panels.profiling.ProfilingPanel` no longer skips
116+
remaining panels or middlewares.
112117
* Improved the installation documentation.
113118
* Fixed a possible crash in the template panel.
114119
* Added support for psycopg2 ``Composed`` objects.
@@ -120,17 +125,19 @@ Change log
120125
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121126
* Removed support for Python 2.
122127
* Removed support for Django's deprecated ``MIDDLEWARE_CLASSES`` setting.
123-
* Restructured ``Panel`` to execute more like the new-style Django MIDDLEWARE.
124-
The ``Panel.__init__()`` method is now passed ``get_response`` as the first
125-
positional argument. The ``Panel.process_request()`` method must now always
128+
* Restructured :class:`debug_toolbar.panels.Panel` to execute more like the
129+
new-style Django MIDDLEWARE. The ``Panel.__init__()`` method is now passed
130+
``get_response`` as the first positional argument. The
131+
:meth:`debug_toolbar.panels.Panel.process_request` method must now always
126132
return a response. Usually this is the response returned by
127133
``get_response()`` but the panel may also return a different response as is
128-
the case in the ``RedirectsPanel``. Third party panels must adjust to this
129-
new architecture. ``Panel.process_response()`` and ``Panel.process_view()``
130-
have been removed as a result of this change.
134+
the case in the :class:`~debug_toolbar.panels.redirects.RedirectsPanel`.
135+
Third party panels must adjust to this new architecture.
136+
``Panel.process_response()`` and ``Panel.process_view()`` have been removed
137+
as a result of this change.
131138

132139
The deprecated API, ``debug_toolbar.panels.DebugPanel``, has been removed.
133-
Third party panels should use ``debug_toolbar.panels.Panel`` instead.
140+
Third party panels should use :class:`debug_toolbar.panels.Panel` instead.
134141

135142
The following deprecated settings have been removed:
136143

docs/panels.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ Panels can ship their own templates, static files and views. All views should
322322
be decorated with ``debug_toolbar.decorators.require_show_toolbar`` to prevent
323323
unauthorized access. There is no public CSS API at this time.
324324

325-
.. autoclass:: debug_toolbar.panels.Panel(*args, **kwargs)
325+
.. autoclass:: debug_toolbar.panels.Panel
326326

327327
.. autoattribute:: debug_toolbar.panels.Panel.nav_title
328328

@@ -366,13 +366,13 @@ common methods available.
366366

367367
Closes the topmost level (window/panel/toolbar)
368368

369-
.. js:function:: djdt.cookie.get
369+
.. js:function:: djdt.cookie.get(key)
370370

371371
This is a helper function to fetch values stored in the cookies.
372372

373373
:param key: The key for the value to be fetched.
374374

375-
.. js:function:: djdt.cookie.set
375+
.. js:function:: djdt.cookie.set(key, value, options)
376376

377377
This is a helper function to set a value stored in the cookies.
378378

0 commit comments

Comments
 (0)