def get_latest_objects(model, num, field='?'):
    model = _get_model(model)
    if field == '?':
        field = model._meta.get_latest_by and '-%s' % model._meta.get_latest_by or field
    return model._default_manager.order_by(field)[:int(num)]
Retrieves the latest ``num`` objects from a given model, in that
dataset/ETHPy150Open justquick/django-native-tags/native_tags/contrib/generic_content.py/get_latest_objects