Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add documentation.

Signed-off-by: Chris Lamb <chris@playfire.com>
  • Loading branch information...
commit c761663c7fc07d8c0e96abe6f78e9aed4683bfc5 1 parent 5025bed
Chris Lamb authored
61  debug_toolbar_user_panel/panels.py
... ...
@@ -1,3 +1,64 @@
  1
+"""
  2
+:mod:`django-debug-toolbar-user-panel`
  3
+======================================
  4
+
  5
+Panel for the `Django Debug Toolbar <https://github.com/django-debug-toolbar/django-debug-toolbar>`_
  6
+to easily and quickly switch between users.
  7
+
  8
+ * View details on the currently logged in user.
  9
+ * Login as any user from an arbitrary email address, username or user ID.
  10
+ * Easily switch between recently logged in users.
  11
+
  12
+The toolbar supports ``django.contrib.auth.models.User`` models that have had
  13
+the `username` field removed.
  14
+
  15
+.. figure::  screenshot.png
  16
+   :align:   center
  17
+
  18
+Installation
  19
+------------
  20
+
  21
+Add ``debug_toolbar_user_panel`` to your ``INSTALLED_APPS``::
  22
+
  23
+    INSTALLED_APPS = (
  24
+        ...
  25
+        'debug_toolbar_user_panel',
  26
+        ...
  27
+    )
  28
+
  29
+Add ``debug_toolbar_user_panel.panels.UserPanel`` to ``DEBUG_TOOLBAR_PANELS``::
  30
+
  31
+    DEBUG_TOOLBAR_PANELS = (
  32
+        'debug_toolbar_user_panel.panels.UserPanel'
  33
+        'debug_toolbar.panels.version.VersionDebugPanel',
  34
+        'debug_toolbar.panels.timer.TimerDebugPanel',
  35
+        'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
  36
+        'debug_toolbar.panels.headers.HeaderDebugPanel',
  37
+        'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
  38
+        'debug_toolbar.panels.sql.SQLDebugPanel',
  39
+        'debug_toolbar.panels.template.TemplateDebugPanel',
  40
+        'debug_toolbar.panels.signals.SignalDebugPanel',
  41
+        'debug_toolbar.panels.logger.LoggingPanel',
  42
+    )
  43
+
  44
+Include ``debug_toolbar_user_panel.urls`` somewhere in your ``urls.py``::
  45
+
  46
+    urlpatterns = patterns('',
  47
+        ...
  48
+        url(r'', include('debug_toolbar_user_panel.urls')),
  49
+        ...
  50
+    )
  51
+
  52
+Links
  53
+-----
  54
+
  55
+View/download code
  56
+  https://github.com/playfire/django-debug-toolbar-user-panel
  57
+
  58
+File a bug
  59
+  https://github.com/playfire/django-debug-toolbar-user-panel/issues
  60
+"""
  61
+
1 62
 from django.template.loader import render_to_string
2 63
 from django.utils.translation import ugettext_lazy as _
3 64
 
BIN  docs/screenshot.png

0 notes on commit c761663

Please sign in to comment.
Something went wrong with that request. Please try again.