def unpack(view_func):
    """
    Marks the returned response as to-be-unpacked if it is a
    ``TemplateResponse``.
    """

    def inner(request, *args, **kwargs):
        response = view_func(request, *args, **kwargs)
        if isinstance(response, TemplateResponse):
            response._feincms_unpack = True
        return response

    return wraps(view_func)(inner)

    Marks the returned response as to-be-unpacked if it is a
    ``TemplateResponse``.
    
feincms/content/application/models.py