aboutsummaryrefslogtreecommitdiffstats
path: root/docs/panels.rst
diff options
context:
space:
mode:
authorAymeric Augustin2013-11-24 17:13:11 +0100
committerAymeric Augustin2013-11-24 17:15:59 +0100
commitf52f266c691fd8bb80b21ab2a983118b914c04fa (patch)
tree3cafd92796aae91e63abc3958ab1642745b6cfd8 /docs/panels.rst
parentc92f710125218755c275ae98581a4305e57fd3fa (diff)
downloaddjango-debug-toolbar-f52f266c691fd8bb80b21ab2a983118b914c04fa.tar.bz2
Clean up and document the Panel API.
Diffstat (limited to 'docs/panels.rst')
-rw-r--r--docs/panels.rst40
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/panels.rst b/docs/panels.rst
index 39ddf7f..c766780 100644
--- a/docs/panels.rst
+++ b/docs/panels.rst
@@ -212,3 +212,43 @@ URL: https://github.com/playfire/django-debug-toolbar-user-panel
Path: ``debug_toolbar_user_panel.panels.UserPanel``
Easily switch between logged in users, see properties of current user.
+
+API for third-party panels
+--------------------------
+
+Third-party panels must subclass :class:`~debug_toolbar.panels.Panel`,
+according to the public API described below. Unless noted otherwise, all
+methods are optional.
+
+Panels can ship their own templates, static files and views. They're no public
+CSS or JavaScript API at this time, but they can assume jQuery is available.
+
+.. autoclass:: debug_toolbar.panels.Panel(*args, **kwargs)
+
+ .. autoattribute:: debug_toolbar.panels.Panel.nav_title
+
+ .. autoattribute:: debug_toolbar.panels.Panel.nav_subtitle
+
+ .. autoattribute:: debug_toolbar.panels.Panel.has_content
+
+ .. autoattribute:: debug_toolbar.panels.Panel.title
+
+ .. autoattribute:: debug_toolbar.panels.Panel.template
+
+ .. autoattribute:: debug_toolbar.panels.Panel.content
+
+ .. automethod:: debug_toolbar.panels.Panel.get_urls
+
+ .. automethod:: debug_toolbar.panels.Panel.enable_instrumentation
+
+ .. automethod:: debug_toolbar.panels.Panel.disable_instrumentation
+
+ .. automethod:: debug_toolbar.panels.Panel.record_stats
+
+ .. automethod:: debug_toolbar.panels.Panel.get_stats
+
+ .. automethod:: debug_toolbar.panels.Panel.process_request
+
+ .. automethod:: debug_toolbar.panels.Panel.process_view
+
+ .. automethod:: debug_toolbar.panels.Panel.process_response