datatracker/ietf/group/ajax.py
Henrik Levkowetz 2a551bb35b Made ietf/group/ pyflakes-clean.
- Legacy-Id: 7465
2014-03-15 17:02:52 +00:00

15 lines
422 B
Python

import json
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
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")