From e6a696797ecacd705251b00f2a4863b1237889aa Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sat, 27 Jan 2024 07:21:24 -0600 Subject: gtd: now displays months when needed --- app/gtd/models.py | 3 ++- app/gtd/templates/gtd/wiredpost_table.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'app/gtd') diff --git a/app/gtd/models.py b/app/gtd/models.py index 3ad2931..457083f 100644 --- a/app/gtd/models.py +++ b/app/gtd/models.py @@ -106,6 +106,7 @@ class NoteType(models.IntegerChoices): return num return None + class GTDNote(models.Model): title = models.CharField(max_length=200) url = models.CharField(max_length=400, blank=True, null=True) @@ -164,7 +165,7 @@ class WiredUpdate(models.Model): date = models.DateField(blank=True, null=True) class Meta: - ordering = ('-date',) + ordering = ('date',) def __str__(self): return self.name diff --git a/app/gtd/templates/gtd/wiredpost_table.html b/app/gtd/templates/gtd/wiredpost_table.html index a65ce9c..15f62b7 100644 --- a/app/gtd/templates/gtd/wiredpost_table.html +++ b/app/gtd/templates/gtd/wiredpost_table.html @@ -65,7 +65,7 @@ Date last pub {{object.category.name}} {{object.date_last_pub}} {{object.post_type}}{{object.get_post_type_display}} - {{object.update_frequency}} + {% if object.update_schedule %}{% for obj in object.update_schedule.all%}{{obj}}{% if forloop.last%}{%else%}, {%endif%}{%endfor%}{%else%}{{object.update_frequency}}{% endif %} {% if object.needs_update %} 1True{%else%} 0False{%endif%} -- cgit v1.2.3-70-g09d2