pytask/taskapp/utils.py
author Nishanth Amuluru <nishanth@fossee.in>
Sun, 09 Jan 2011 19:45:42 +0530
changeset 129 13e171f09941
parent 106 aa61ea9c29f9
child 132 1be4a3c09a47
permissions -rw-r--r--
added unpublished tasks to home_page

from pytask.taskapp.models import Task
from django.http import Http404

def getTask(tid):

    try:
        task = Task.objects.get(uniq_key=tid)
        return task
    except Task.DoesNotExist:
        raise Http404