def register(self, model, model_admin=None, **kwargs):
    '\n        Registers the given model with the given admin class. Once a model is\n        registered in self.registry, we also add it to app registries in\n        self.apps.\n\n        If no model_admin is passed, it will use ModelAdmin2. If keyword\n        arguments are given they will be passed to the admin class on\n        instantiation.\n\n        If a model is already registered, this will raise ImproperlyConfigured.\n        '
    if (model in self.registry):
        raise ImproperlyConfigured(('%s is already registered in django-admin2' % model))
    if (not model_admin):
        model_admin = types.ModelAdmin2
    self.registry[model] = model_admin(model, admin=self, **kwargs)
    app_label = utils.model_options(model).app_label
    if (app_label in self.apps.keys()):
        self.apps[app_label][model] = self.registry[model]
    else:
        self.apps[app_label] = {model: self.registry[model]}
Registers the given model with the given admin class. Once a model is
registered in self.registry, we also add it to app registries in
self.apps.

If no model_admin is passed, it will use ModelAdmin2. If keyword
arguments are given they will be passed to the admin class on
instantiation.

If a model is already registered, this will raise ImproperlyConfigured.
def register(self, model, model_admin=None, **kwargs):
    '\n        Registers the given model with the given admin class. Once a model is\n        registered in self.registry, we also add it to app registries in\n        self.apps.\n\n        If no model_admin is passed, it will use ModelAdmin2. If keyword\n        arguments are given they will be passed to the admin class on\n        instantiation.\n\n        If a model is already registered, this will raise ImproperlyConfigured.\n        '
    if (model in self.registry):
        raise ImproperlyConfigured(('%s is already registered in django-admin2' % model))
    if (not model_admin):
        model_admin = types.ModelAdmin2
    self.registry[model] = model_admin(model, admin=self, **kwargs)
    app_label = utils.model_options(model).app_label
    if (app_label in self.apps.keys()):
        self.apps[app_label][model] = self.registry[model]
    else:
        self.apps[app_label] = {model: self.registry[model]}