@redirect_legacy_projects
def q_view_existing(request, project_name=None, ontology_key=None, document_type=None, realization_pk=None):
    '\n    this is exactly the same as "q_edit_existing" except:\n    there are no authentication checks,\n    the template_context & template are different.\n    :param request:\n    :param project_name:\n    :param ontology_key:\n    :param document_type:\n    :param realization_pk:\n    :return:\n    '
    context = add_parameters_to_context(request)
    (validity, project, ontology, model_proxy, model_customization, msg) = validate_view_arguments(project_name=project_name, ontology_key=ontology_key, document_type=document_type)
    if (not validity):
        return q_error(request, msg)
    try:
        session_key = get_key_from_request(request)
        cached_realizations_key = '{0}_realizations'.format(session_key)
        model_realization = get_or_create_cached_object(request.session, cached_realizations_key, get_existing_realizations, **{'project': project, 'ontology': ontology, 'model_proxy': model_proxy, 'model_id': realization_pk})
    except ObjectDoesNotExist:
        msg = "Cannot find a document with an id of '{0}' for that project/ontology/document type combination.".format(realization_pk)
        return q_error(request, msg)
    view_url_dirname = request.path.rsplit('/', 1)[0]
    api_url_dirname = reverse('realization-detail', kwargs={'pk': model_realization.pk}).rsplit('/', 2)[0]
    template_context = {'project': project, 'ontology': ontology, 'proxy': model_proxy, 'view_url_dirname': view_url_dirname, 'api_url_dirname': api_url_dirname, 'session_key': session_key, 'customization': model_customization, 'realization': model_realization, 'read_only': 'true'}
    return render_to_response('questionnaire/q_view.html', template_context, context_instance=context)
this is exactly the same as "q_edit_existing" except:
there are no authentication checks,
the template_context & template are different.
:param request:
:param project_name:
:param ontology_key:
:param document_type:
:param realization_pk:
:return:
@redirect_legacy_projects
def q_view_existing(request, project_name=None, ontology_key=None, document_type=None, realization_pk=None):
    '\n    this is exactly the same as "q_edit_existing" except:\n    there are no authentication checks,\n    the template_context & template are different.\n    :param request:\n    :param project_name:\n    :param ontology_key:\n    :param document_type:\n    :param realization_pk:\n    :return:\n    '
    context = add_parameters_to_context(request)
    (validity, project, ontology, model_proxy, model_customization, msg) = validate_view_arguments(project_name=project_name, ontology_key=ontology_key, document_type=document_type)
    if (not validity):
        return q_error(request, msg)
    try:
        session_key = get_key_from_request(request)
        cached_realizations_key = '{0}_realizations'.format(session_key)
        model_realization = get_or_create_cached_object(request.session, cached_realizations_key, get_existing_realizations, **{'project': project, 'ontology': ontology, 'model_proxy': model_proxy, 'model_id': realization_pk})
    except ObjectDoesNotExist:
        msg = "Cannot find a document with an id of '{0}' for that project/ontology/document type combination.".format(realization_pk)
        return q_error(request, msg)
    view_url_dirname = request.path.rsplit('/', 1)[0]
    api_url_dirname = reverse('realization-detail', kwargs={'pk': model_realization.pk}).rsplit('/', 2)[0]
    template_context = {'project': project, 'ontology': ontology, 'proxy': model_proxy, 'view_url_dirname': view_url_dirname, 'api_url_dirname': api_url_dirname, 'session_key': session_key, 'customization': model_customization, 'realization': model_realization, 'read_only': 'true'}
    return render_to_response('questionnaire/q_view.html', template_context, context_instance=context)