PageRenderTime 62ms CodeModel.GetById 58ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/tests/regressiontests/test_utils/views.py

https://code.google.com/p/mango-py/
Python | 7 lines | 6 code | 1 blank | 0 comment | 0 complexity | 6d2f1d6cde8df28a0e90b4329df165e8 MD5 | raw file
1from django.http import HttpResponse
2from django.shortcuts import get_object_or_404
3from models import Person
4
5def get_person(request, pk):
6    person = get_object_or_404(Person, pk=pk)
7    return HttpResponse(person.name)