summaryrefslogtreecommitdiff
path: root/app/gtd
diff options
context:
space:
mode:
Diffstat (limited to 'app/gtd')
-rw-r--r--app/gtd/views.py20
1 files changed, 5 insertions, 15 deletions
diff --git a/app/gtd/views.py b/app/gtd/views.py
index 8a32315..c4c8d92 100644
--- a/app/gtd/views.py
+++ b/app/gtd/views.py
@@ -46,10 +46,11 @@ class GTDNoteListView(ListView):
def get_queryset(self):
if self.kwargs['note_type']:
- status_reverse = dict((v, k) for k, v in GTDNote.NOTE_TYPE)
- status = status_reverse[self.kwargs['note_type'].title()]
- return GTDNote.objects.filter(status=status)
- return GTDNote.objects.filter(status=1)
+ print(self.kwargs['note_type'])
+ note_type_reverse = dict((v, k) for k, v in GTDNote.NOTE_TYPE)
+ note_type = note_type_reverse[self.kwargs['note_type'].title()]
+ return GTDNote.objects.filter(note_type=note_type)
+ return GTDNote.objects.all()
def get_context_data(self, **kwargs):
context = super(GTDNoteListView, self).get_context_data(**kwargs)
@@ -57,17 +58,6 @@ class GTDNoteListView(ListView):
return context
-class GTDNoteWiredListView(GTDNoteListView):
-
- def get_queryset(self):
- if self.kwargs['status']:
- status_reverse = dict((v, k) for k, v in GTDNote.STATUS)
- status = status_reverse[self.kwargs['note_type'].title()]
- return GTDNote.objects.filter(status=status)
- return GTDNote.objects.filter(status=1)
-
-
-
class GTDNoteTODOView(ListView):
model = GTDNote
template_name = "gtd/note_list.html"