noc.lib.registry

Module Contents

class noc.lib.registry.Registry

Bases: object

Abstract module loader/registry

name = Registry
subdir = directory
classname = Class
apps
exclude = []
exclude_daemons = []
choices

For model field’s choices=

register(self, name, module)

Should be called within metaclass’ __new__ method

register_all(self)

Usually called at the top of the models.py

__getitem__(self, name)
__contains__(self, item)