diff --git a/README.txt b/README.txt index 0730e3c..9f2ae04 100755 --- a/README.txt +++ b/README.txt @@ -3,7 +3,11 @@ Task Examples:: >>> from loops.task import Task - >>> t = Task() - >>> t.title + >>> t1 = Task() + >>> t1.title u'' + >>> t2 = Task(u't2', u'Second Task') + >>> t2.title + u'Second Task' + diff --git a/task.py b/task.py index 00f24ed..a15d0d2 100644 --- a/task.py +++ b/task.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2004 Helmut Merz helmutm@cy55.de +# Copyright (c) 2005 Helmut Merz helmutm@cy55.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -35,17 +35,6 @@ from interfaces import ITask from copy import copy -class ResourceAllocation(Relation): - """ A relation that represents an allocation of a resource - to a task. - """ - - -class ResourceAllocations(Relations): - """ A set of resource allocations. - """ - - class Task(OrderedContainer): implements(ITask) @@ -54,12 +43,12 @@ class Task(OrderedContainer): qualifier = u'' priority = FieldProperty(ITask['priority']) - def __init__(self): + def __init__(self, name=None, title=u''): OrderedContainer.__init__(self) - self._subtasks = Relations() - self._parentTasks = Relations() - self._resourceAllocs = {} - self.resourceConstraints = [] + if name: + self.__name__ = name + if title: + self.title = title # subtasks: