author | Nishanth Amuluru <nishanth@fossee.in> |
Wed, 12 Jan 2011 00:22:27 +0530 | |
changeset 149 | 32dd15eaf9d0 |
parent 132 | 1be4a3c09a47 |
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