summaryrefslogtreecommitdiff
path: root/app/ebay/models.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2016-12-31 15:56:49 -0500
committerluxagraf <sng@luxagraf.net>2016-12-31 15:56:49 -0500
commit7d8943e969692814d67c140a079390619900d145 (patch)
tree77336114ef94653e3ad41630817e478b23c72cab /app/ebay/models.py
parentc80b4dea965ac903d984e0e4b415b430e1fdfb21 (diff)
added link to auction
Diffstat (limited to 'app/ebay/models.py')
-rw-r--r--app/ebay/models.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/ebay/models.py b/app/ebay/models.py
index f361b7a..fd5d0a3 100644
--- a/app/ebay/models.py
+++ b/app/ebay/models.py
@@ -37,16 +37,21 @@ class TrackedItem(models.Model):
ordering = ('date_ending', 'amount_desired')
get_latest_by = 'date_ending'
- def save(self, **kwargs):
- super(TrackedItem, self).save()
-
@property
def get_latest_price(self):
return self.price_set.latest().price
+ def admin_link(self):
+ return force_text('<a href="%s">View Auction page</a>' % (self.url))
+ admin_link.allow_tags = True
+ admin_link.short_description = 'Link'
+
def __str__(self):
return self.title
+ def save(self, **kwargs):
+ super(TrackedItem, self).save()
+
class Price(models.Model):
date = models.DateTimeField(blank=True)