def ajax_navigate(request, obj_type, obj_ref, obj_revi): context = get_navigate_data(request, obj_type, obj_ref, obj_revi) data = { "width": context["img_width"], "height": context["img_height"], "divs": context["map_areas"], "form": context["filter_object_form"].as_ul(), "edges": context["edges"], "add_buttons": render_to_string("navigate/add_buttons.html", context), "past": context["past"], } return data
def navigate(request, obj_type, obj_ref, obj_revi): """ Manage html page which displays a graphical picture the different links between :class:`~django.contrib.auth.models.User` and :class:`.models.PLMObject`. This function uses Graphviz (http://graphviz.org/). Some filters let user defines which type of links he/she wants to display. It computes a context dictionary based on .. include:: views_params.txt """ ctx = get_navigate_data(request, obj_type, obj_ref, obj_revi) ctx["edges"] = json.dumps(ctx["edges"]) return r2r('navigate.html', ctx, request)