diff options
Diffstat (limited to 'app/gtd/views.py')
-rw-r--r-- | app/gtd/views.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/gtd/views.py b/app/gtd/views.py index bb11030..eaa14a6 100644 --- a/app/gtd/views.py +++ b/app/gtd/views.py @@ -76,12 +76,17 @@ class GTDNoteTODOView(ListView): template_name = "gtd/note_list.html" def get_queryset(self): + project = self.request.GET.get("project", False) # need to get wired notes and gtd notes and blend them by # date created maybe? - return GTDNote.objects.filter(status=1) + if project: + return GTDNote.objects.filter(status=1,note_type__in=[1,2],project__title=project) + return GTDNote.objects.filter(status=1,note_type__in=[1,2]) def get_context_data(self, **kwargs): context = super(GTDNoteTODOView, self).get_context_data(**kwargs) + context['projects'] = GTDProject.objects.all() + context['project'] = self.request.GET.get("project", False) return context |