From dc33509f30f5a6c8198aef655a2b1f4b12f426fb Mon Sep 17 00:00:00 2001 From: = <=> Date: Fri, 16 Aug 2024 12:06:22 -0400 Subject: [PATCH] add auction to menu for #180 --- auctions/models.py | 6 +++++- auctions/templates/base.html | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/auctions/models.py b/auctions/models.py index 440536f..a77da9b 100755 --- a/auctions/models.py +++ b/auctions/models.py @@ -543,11 +543,15 @@ def auction_type_as_str(self): return "unknown auction type" def get_absolute_url(self): - return f'/auctions/{self.slug}/' + return self.url def get_edit_url(self): return f'/auctions/{self.slug}/edit/' + @property + def url(self): + return f'/auctions/{self.slug}/' + @property def label_print_link(self): return f"{self.get_absolute_url()}?printredirect={reverse('print_my_labels', kwargs={'slug': self.slug})}" diff --git a/auctions/templates/base.html b/auctions/templates/base.html index effa792..de6f277 100755 --- a/auctions/templates/base.html +++ b/auctions/templates/base.html @@ -249,9 +249,24 @@ The best time to add lots --> + {% if request.user.is_authenticated and request.user.userdata.last_auction_used %} + + {% else %} + {% endif %} +