Commit 06c2223a authored by Bram Schoenmakers's avatar Bram Schoenmakers

Make the todolist a public property of a view.

parent f8f6c8c4
......@@ -23,14 +23,14 @@ class View(object):
to the list.
"""
def __init__(self, p_sorter, p_filters, p_todolist):
self._todolist = p_todolist
self.todolist = p_todolist
self._sorter = p_sorter
self._filters = p_filters
@property
def todos(self):
""" Returns a sorted and filtered list of todos in this view. """
result = self._sorter.sort(self._todolist.todos())
result = self._sorter.sort(self.todolist.todos())
for _filter in self._filters:
result = _filter.filter(result)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment