def METHOD_NAME(request, id=None, template_name="entities/view.html"):
    if not id: return HttpResponseRedirect(reverse('entity.search'))
    entity = get_object_or_404(Entity, pk=id)
    if has_perm(request.user,'entities.view_entity',entity):
        EventLog.objects.log(instance=entity)
        return render_to_resp(request=request, template_name=template_name,
            context={'entity': entity})
    else:
        raise Http403