Debug with django-debug-toolbar

When using LDAP throughout your project, it is useful to see what operations did perform on the server side. This can be done using the django-debug-toolbar with the LDAP Panel` provided with this module.

This panel shows you the metrics for each domain (if you have configured them to collect metrics), and every operation the server perform against the LDAP server, including the LDAP filter and every each entry it responded with.


In order to view the LDAP Panel to the debug toolbar, you will need to install the django-debug-toolbar package:

$ pip install django-debug-toolbar

And follow the installation guide on django-debug-toolbar docs

Then to add the LDAP Panel, insert it to the DEBUG_TOOLBAR_PANELS setting like so:

    # ...
    # ...

To enable all of the LDAP Panel feature, you may want to enable metrics collection for all your domains:

    "EXAMPLE1": LDAPSettings(
        PASSWORD="<super secret>",
    "EXAMPLE2": {
        "SERVER": "example.local",
        "SEARCH_BASE": "DC=example,DC=local",
        "USERNAME": "EXAMPLE\\bind_account",
        "PASSWORD": "<super secret>",
        "COLLECT_METRICS": True,