From 3562e295581d733039df0b72da3c993139cd5949 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sat, 27 Jan 2024 15:16:24 -0600 Subject: gtd: sorted project detail view by note type --- app/gtd/models.py | 3 +++ app/gtd/templates/gtd/project_detail.html | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'app/gtd') diff --git a/app/gtd/models.py b/app/gtd/models.py index 457083f..2ea18ab 100644 --- a/app/gtd/models.py +++ b/app/gtd/models.py @@ -134,6 +134,9 @@ class GTDNote(models.Model): def __str__(self): return self.title + def get_note_type(self): + return self.get_note_type_display() + def save(self, *args, **kwargs): self.body_html = markdown_to_html(self.body_markdown) super(GTDNote, self).save(*args, **kwargs) diff --git a/app/gtd/templates/gtd/project_detail.html b/app/gtd/templates/gtd/project_detail.html index 844a120..d9a5657 100644 --- a/app/gtd/templates/gtd/project_detail.html +++ b/app/gtd/templates/gtd/project_detail.html @@ -1,5 +1,6 @@ {% extends 'base_gtd.html' %} {% load typogrify_tags %} +{% load get_note_type %} {% block extrahead %}