'Registers the given model(s) with the given admin class.
The model(s) should be Model classes, not instances.
If an admin class isn\'t given, it will use BaseFreeAdmin (default
admin options). If keyword arguments are given they\'ll be applied
as options to the admin class.'

def register(self, model_or_iterable, admin_class=None, freeadmin=None, **options):

    if (not admin_class):
        admin_class = BaseFreeAdmin
    if isinstance(model_or_iterable, ModelBase):
        model_or_iterable = [model_or_iterable]
    admins = []
    if (model_or_iterable is None):
        admin_obj = admin_class(c=freeadmin, admin=self)
        self._registry[admin_obj] = admin_obj
    else:
        for model in model_or_iterable:
            if (model in self._registry):
                log.debug('Model    %r    already    registered,    overwriting...', model)
            if options:
                options['__module__'] = __name__
                admin_class = type(('%sAdmin' % model.__name__), (admin_class,), options)
            admin_obj = admin_class(c=freeadmin, model=model, admin=self)
            self._registry[model] = admin_obj
            model.add_to_class('_admin', admin_obj)
        admins.append(admin_obj)
    return admins
