def deregister(self, model):
        """
        Deregisters the given model. Remove the model from the self.app as well

        If the model is not already registered, this will raise
        ImproperlyConfigured.
        """
        try:
            del self.registry[model]
        except __HOLE__:
            raise ImproperlyConfigured(
                '%s was never registered in django-admin2' % model)

        # Remove the model from the apps registry
        # Get the app label
        app_label = utils.model_options(model).app_label
        # Delete the model from it's app registry
        del self.apps[app_label][model]

        # if no more models in an app's registry
        # then delete the app from the apps.
        if self.apps[app_label] is {}:
            del self.apps[app_label]  # no
dataset/ETHPy150Open pydanny/django-admin2/djadmin2/core.py/Admin2.deregister