def set_managers(sender, **kwargs):
    """
    Make sure all classes have the appropriate managers 
    """
    cls = sender
   
    if issubclass(cls, ModelBase):
        cls.add_to_class('permitted', PermittedManager())
def set_managers ( sender , ** kwargs ) : cls = sender if issubclass ( cls , ModelBase ) : cls . add_to_class ( 'permitted' , PermittedManager ( ) )
Make sure all classes have the appropriate managers