(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.
Deregisters the given model. Remove the model from the self.app as well
Deregisters the given model . Remove the model from the self . app as well
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 KeyError:
            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]
def deregister ( self , model ) : try : del self . registry [ model ] except KeyError : 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 ]