

def get_latest_object(model, field=None):
    "\n    Retrieves the latest object from a given model, in that model's\n    default ordering, and stores it in a context variable.\n    The optional field argument specifies which field to get_latest_by, otherwise the model's default is used\n    \n    Syntax::\n    \n        {% get_latest_object [app_name].[model_name] [field] as [varname] %}\n    \n    Example::\n    \n        {% get_latest_object comments.freecomment submitted_date as latest_comment %}\n    \n    "
    return _get_model(field)._default_manager.latest(field)

dataset/ETHPy150Open justquick/django-native-tags/native_tags/contrib/generic_content.py get_latest_object/VarMisuse@19/199 `model`->`field`