summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/gtd/forms.py17
-rw-r--r--app/gtd/urls.py2
-rw-r--r--app/gtd/views.py10
3 files changed, 8 insertions, 21 deletions
diff --git a/app/gtd/forms.py b/app/gtd/forms.py
index 595611b..3e93a02 100644
--- a/app/gtd/forms.py
+++ b/app/gtd/forms.py
@@ -27,23 +27,6 @@ class GTDProjectUpdateForm(ModelForm):
fields = ['title', 'body_markdown', 'date_goal', 'project_type', 'outcome', 'date_ended']
-class WiredNoteCreateForm(ModelForm):
-
- def __init__(self, *args, **kwargs):
- user = kwargs.pop('user')
- self.user = user
- super(WiredNoteCreateForm, self).__init__(*args, **kwargs)
- self.fields['post'].required = False
-
- def save(self, commit=True):
- self.instance.user = self.user
- return super().save(commit=commit)
-
- class Meta:
- model = WiredNote
- fields = ['title', 'url', 'body_markdown', 'post']
-
-
class WiredNoteEditForm(ModelForm):
def __init__(self, *args, **kwargs):
diff --git a/app/gtd/urls.py b/app/gtd/urls.py
index a56bbf4..c47e968 100644
--- a/app/gtd/urls.py
+++ b/app/gtd/urls.py
@@ -8,7 +8,7 @@ urlpatterns = [
path(
r'todo',
views.GTDNoteTODOView.as_view(),
- name="note-todo"
+ name="todo-list"
),
path(
r'notes',
diff --git a/app/gtd/views.py b/app/gtd/views.py
index db014b1..bb11030 100644
--- a/app/gtd/views.py
+++ b/app/gtd/views.py
@@ -8,7 +8,6 @@ from .forms import (
GTDNoteEditForm,
GTDProjectCreateForm,
GTDProjectUpdateForm,
- WiredNoteCreateForm,
WiredNoteEditForm,
WiredPostUpdateForm
)
@@ -46,7 +45,6 @@ class GTDNoteUpdateView(UpdateView):
return reverse('gtd:note-list', kwargs={"pk": self.object.project.pk})
-
class GTDNoteListView(ListView):
model = GTDNote
template_name = "gtd/note_list.html"
@@ -78,8 +76,14 @@ class GTDNoteTODOView(ListView):
template_name = "gtd/note_list.html"
def get_queryset(self):
+ # need to get wired notes and gtd notes and blend them by
+ # date created maybe?
return GTDNote.objects.filter(status=1)
+ def get_context_data(self, **kwargs):
+ context = super(GTDNoteTODOView, self).get_context_data(**kwargs)
+ return context
+
class GTDProjectCreateView(CreateView):
model = GTDProject
@@ -139,7 +143,7 @@ class GTDProjectDeleteView(DeleteView):
class WiredNoteCreateView(CreateView):
model = WiredNote
- form_class = WiredNoteCreateForm
+ fields = ['title', 'url', 'body_markdown', 'post']
template_name = "gtd/wirednote_form.html"
def get_success_url(self):