def get_model(model_name):
    """
    model_name must be app.model
    """
    try:
        from django.db.models import get_model
    except:
        from django.apps import apps
        get_model = apps.get_model
    app, model = model_name.split('.')
    if not app or not model:
        raise ValueError('model_name is must be in the format app.model')
    return get_model(app, model)
