From 74765e70a21d3788cab7fc280330b091d55b4a73 Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 14 Nov 2025 21:01:25 +0000 Subject: [PATCH] Add created_date and modified_date fields to Resource model; enhance resource navigation with dropdown menu in base template --- atlas/models.py | 2 ++ atlas/templates/atlas/base.html | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/atlas/models.py b/atlas/models.py index f499308b..b0af8bfd 100644 --- a/atlas/models.py +++ b/atlas/models.py @@ -1876,6 +1876,8 @@ class Resource(models.Model, AuthorMixin): help_text="Author of the resource", related_name="resources", ) + created_date = models.DateTimeField(default=timezone.now) + modified_date = models.DateTimeField(auto_now=True) # Link resources to one or more Sites (from generic.Site) sites = models.ManyToManyField( 'generic.Site', diff --git a/atlas/templates/atlas/base.html b/atlas/templates/atlas/base.html index b9e27e33..8a846f21 100755 --- a/atlas/templates/atlas/base.html +++ b/atlas/templates/atlas/base.html @@ -69,8 +69,19 @@ -