Debugging

Two tools are provided to debug issues with your registry:

  • the logger logs everything (and it likes to log malicious users too),
  • the url provides a live rule registry browser (see below).

As usual, resort to ipdb, for example in rules_light.RuleRegistry.run() place:

import ipdb; ipdb.set_trace()

The registry browser

class rules_light.views.RegistryView(**kwargs)[source]

Expose the rule registry for debug purposes.

Install it as such:

url(r'^rules/$', RegistryView.as_view(), name='rules_light_registry'),

Or just:

url(r'^rules/', include('rules_light.urls')),

Note: view requires 'rules_light.rule.read' which is enabled for admins by default.

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

get_context_data()[source]

Add the registry to the context.