def __init__(self, model_or_app_label):
        """
        Constructor

        Parameters
        ----------
        model_or_app_label : django model class or string
            A django model class or application label string.
            Use django model class for model level permission and application
            label for application level permission.
        """
        if isinstance(model_or_app_label, str):
            self.app_label = model_or_app_label
            self.model = None
            if self.includes is None:
                self.includes = self._get_app_perms
        else:
            self.app_label = model_or_app_label._meta.app_label
            self.model = model_or_app_label
            self.model._permission_handler = self
            if self.includes is None:
                self.includes = self._get_model_perms
def __init__ ( self , model_or_app_label ) : if isinstance ( model_or_app_label , str ) : self . app_label = model_or_app_label self . model = None if self . includes is None : self . includes = self . _get_app_perms else : self . app_label = model_or_app_label . _meta . app_label self . model = model_or_app_label self . model . _permission_handler = self if self . includes is None : self . includes = self . _get_model_perms
Constructor

        Parameters
        ----------
        model_or_app_label : django model class or string
            A django model class or application label string.
            Use django model class for model level permission and application
            label for application level permission.