def retrieve_object(model, *args, **kwargs):
if len(args) == <NUM_LIT:1>:<EOL><INDENT>kwargs.update({'<STR_LIT>': args[<NUM_LIT:0>]})<EOL><DEDENT>_model = _get_model(model)<EOL>try:<EOL><INDENT>return _model._default_manager.get(**kwargs)<EOL><DEDENT>except _model.DoesNotExist:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>
Retrieves a specific object from a given model by primary-key
lookup, and stores it in a context variable.

Syntax::

    {% retrieve_object [app_name].[model_name] [lookup kwargs] as [varname] %}

Example::

    {% retrieve_object flatpages.flatpage pk=12 as my_flat_page %}