X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/3959dcce625dfbc4ede92e73c491ca0c753e3a4f..2a86715582836a3225790b8fc7b964dcc12db6f6:/tasklib/task.py diff --git a/tasklib/task.py b/tasklib/task.py index 182fead..e346f67 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -8,6 +8,7 @@ import subprocess DATE_FORMAT = '%Y%m%dT%H%M%SZ' REPR_OUTPUT_SIZE = 10 PENDING = 'pending' +COMPLETED = 'completed' logger = logging.getLogger(__name__) @@ -24,7 +25,6 @@ class Task(object): def __init__(self, warrior, data={}): self.warrior = warrior self._data = data - print data self._modified_fields = set() def __unicode__(self): @@ -195,6 +195,9 @@ class TaskQuerySet(object): def pending(self): return self.filter(status=PENDING) + def completed(self): + return self.filter(status=COMPLETED) + def filter(self, *args, **kwargs): """ Returns a new TaskQuerySet with the given filters added.