Source code for rules_light.views

from __future__ import unicode_literals

from django.views import generic

import rules_light

[docs]class RegistryView(generic.TemplateView): """ 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 ``''`` which is enabled for admins by default. """ template_name = 'rules_light/registry.html'
[docs] def get_context_data(self): """ Add the registry to the context. """ return {'registry': rules_light.registry}