1
from pytask.taskapp.models import Task
2
from django.http import Http404
3
4
def getTask(tid):
5
6
try:
7
task = Task.objects.exclude(status="DL").get(uniq_key=tid)
8
return task
9
except Task.DoesNotExist:
10
raise Http404
11