Get model by its name.

    :param str model_name: name of model.
    :return django.db.models.Model:

    Example:
        get_concrete_model_by_name('auth.User')
        django.contrib.auth.models.User

def get_model_by_name(model_name):
    """ Get model by its name.

    :param str model_name: name of model.
    :return django.db.models.Model:

    Example:
        get_concrete_model_by_name('auth.User')
        django.contrib.auth.models.User

    """
    if isinstance(model_name, six.string_types) and \
            len(model_name.split('.')) == 2:
        app_name, model_name = model_name.split('.')

        if django.VERSION[:2] < (1, 8):
            model = models.get_model(app_name, model_name)
        else:
            from django.apps import apps
            model = apps.get_model(app_name, model_name)
    else:
        raise ValueError("{0} is not a Django model".format(model_name))

    return model