From 089185f38c3e8bb3596400fcfa6c29c7ab63870e Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Tue, 17 May 2016 07:21:22 +0200 Subject: [PATCH] re-add get_absolute_url method for order --- shop/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shop/models.py b/shop/models.py index 9cabc521..8c6368d0 100644 --- a/shop/models.py +++ b/shop/models.py @@ -95,6 +95,9 @@ class Order(CreatedUpdatedModel): def description(self): return "BornHack 2016 order #%s" % self.pk + def get_absolute_url(self): + return str(reverse_lazy('shop:order_detail', kwargs={'pk': self.pk})) + class ProductCategory(CreatedUpdatedModel, UUIDModel): class Meta: verbose_name = 'Product category'