@handle_response_format
@treeio_login_required
def group_view(request, group_id, response_format='html'):
 group = get_object_or_404(Group, pk=group_id)
 contacts = Object.filter_by_request(request, Contact.objects.filter(related_user=group).order_by('name'))
 members = User.objects.filter((Q(default_group=group) | Q(other_groups=group))).distinct()
 subgroups = Group.objects.filter(parent=group)
 types = Object.filter_by_request(request, ContactType.objects.order_by('name'))
 return render_to_response('identities/group_view', {'group': group, 'subgroups': subgroups, 'members': members, 'contacts': contacts, 'types': types}, context_instance=RequestContext(request), response_format=response_format)

@ handle_response_format @ treeio_login_required def group_view ( request , group_id , response_format = 'html' ) : group = get_object_or_404 ( Group , pk = group_id ) contacts = Object . filter_by_request ( request , Contact . objects . filter ( related_user = group ) . order_by ( 'name' ) ) members = User . objects . filter ( ( Q ( default_group = group ) | Q ( other_groups = group ) ) ) . distinct ( ) subgroups = Group . objects . filter ( parent = group ) types = Object . filter_by_request ( request , ContactType . objects . order_by ( 'name' ) ) return render_to_response ( 'identities/group_view' , { 'group' : group , 'subgroups' : subgroups , 'members' : members , 'contacts' : contacts , 'types' : types } , context_instance = RequestContext ( request ) , response_format = response_format )
group view .