def get_model_name(model):
    """Return the model's name.

    Args:
        model (django.db.models.Model):
            The model for which to return the name.

    Returns:
        str: The model's name.
    """
    if hasattr(model._meta, 'model_name'):
        # Django >= 1.7
        return model._meta.model_name
    else:
        # Django < 1.7
        return model._meta.module_name