[extensions-web] extensions: Add a get_absolute_url to ExtensionVersion



commit 0c9c417155891578f8de9a2d2c068f712b048b0e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Apr 1 22:38:21 2012 -0400

    extensions: Add a get_absolute_url to ExtensionVersion

 sweettooth/extensions/models.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/extensions/models.py b/sweettooth/extensions/models.py
index 409b722..03f3953 100644
--- a/sweettooth/extensions/models.py
+++ b/sweettooth/extensions/models.py
@@ -389,6 +389,11 @@ class ExtensionVersion(models.Model):
             else:
                 self.shell_versions.add(sv)
 
+    def get_absolute_url(self):
+        return reverse('extensions-version-detail', kwargs=dict(pk=self.pk,
+                                                                ext_pk=self.extension.pk,
+                                                                slug=self.extension.slug))
+
     def get_status_class(self):
         return STATUSES[self.status].lower()
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]