datatracker/ietf/group/ajax.py
Ole Laursen 083b3138c6 Rename group AJAX URL parameter to acronym instead of groupname since
it is in fact the acronym, not the name of the group
 - Legacy-Id: 7064
2013-12-24 12:49:25 +00:00

17 lines
462 B
Python

import datetime
import logging
import json
from django.shortcuts import get_object_or_404
from django.http import HttpResponse, Http404
from ietf.group.models import Group
def group_json(request, acronym):
group = get_object_or_404(Group, acronym=acronym)
return HttpResponse(json.dumps(group.json_dict(request.build_absolute_uri('/')),
sort_keys=True, indent=2),
content_type="text/json")