diff options
author | luxagraf <sng@luxagraf.net> | 2023-12-31 09:53:23 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2023-12-31 09:53:23 -0500 |
commit | 79ca97d3d750a78d62ed402fc8333f2d3e9f5b50 (patch) | |
tree | 897529f85bcd84cbc75f35ce28736bd8acfcfba3 /app/gtd/views.py | |
parent | 0a03a56a8c4de51bb40d9fb42800c8a2411c696a (diff) |
gtd: cleaned up project detail view and added links
Diffstat (limited to 'app/gtd/views.py')
-rw-r--r-- | app/gtd/views.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/gtd/views.py b/app/gtd/views.py index c077d77..96c6387 100644 --- a/app/gtd/views.py +++ b/app/gtd/views.py @@ -56,12 +56,12 @@ class GTDNoteListView(ListView): note_type_reverse = dict((v, k) for k, v in GTDNote.NOTE_TYPE) note_type = note_type_reverse[self.kwargs['note_type'].title()] if project: - return GTDNote.objects.filter(note_type=note_type, project__title=project) - return GTDNote.objects.filter(note_type=note_type) + return GTDNote.objects.filter(note_type=note_type, project__title=project, status__in=[0,1]) + return GTDNote.objects.filter(note_type=note_type, status__in=[0,1]) else: if project: - return GTDNote.objects.filter(project__title=project) - return GTDNote.objects.all() + return GTDNote.objects.filter(project__title=project, status__in=[0,1]) + return GTDNote.objects.filter(status__in=[0,1]) def get_context_data(self, **kwargs): context = super(GTDNoteListView, self).get_context_data(**kwargs) |