author | Nishanth Amuluru <nishanth@fossee.in> |
Tue, 11 Jan 2011 00:00:48 +0530 | |
changeset 132 | 1be4a3c09a47 |
parent 106 | aa61ea9c29f9 |
permissions | -rw-r--r-- |
from pytask.taskapp.models import Task, TextBook from django.http import Http404 def getTask(tid): try: task = Task.objects.get(uniq_key=tid) return task except Task.DoesNotExist: raise Http404 def getTextBook(tid): try: task = TextBook.objects.get(uniq_key=tid) return task except TextBook.DoesNotExist: raise Http404