def register(model, critic_descriptor_attr='ratings'):
    from critic.managers import RatingDescriptor

    if model in registry:
        raise AlreadyRegistered("The model '%s' has already been "
            "registered." % model._meta.object_name)
    if hasattr(model, critic_descriptor_attr):
        raise AttributeError("'%s' already has an attribute '%s'. You must "
            "provide a custom critic_descriptor_attr to register." % (
                model._meta.object_name,
                critic_descriptor_attr,
            )
        )

    # Add rating descriptor
    setattr(model, critic_descriptor_attr, RatingDescriptor())

    # Finally register the model
    registry.append(model)
Sets the given model class up for working with critic.
dataset/ETHPy150Open callowayproject/django-critic/critic/__init__.py/register