

def get_random_objects(model, num):
    '\n    Retrieves ``num`` random objects from a given model, and stores\n    them in a context variable.\n    \n    Syntax::\n    \n        {% get_random_objects [app_name].[model_name] [num] as [varname] %}\n    \n    Example::\n    \n        {% get_random_objects comments.freecomment 5 as random_comments %}\n    \n    '
    return _get_model(model)._default_manager.order_by('?')[:int(num)]

dataset/ETHPy150Open justquick/django-native-tags/native_tags/contrib/generic_content.py get_random_objects/original