[damned-lies] Don't use hardcoded url for fake teams



commit 88f20ede24b9157c16c6606ebc4197ba66fcca19
Author: Claude Paroz <claude 2xlibre net>
Date:   Thu Mar 25 09:30:28 2010 +0100

    Don't use hardcoded url for fake teams

 teams/models.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/teams/models.py b/teams/models.py
index a055866..0d85ee2 100644
--- a/teams/models.py
+++ b/teams/models.py
@@ -217,9 +217,9 @@ class FakeTeam(object):
         self.language = language
         self.description = _("No team for locale %s") % self.language.locale
 
+    @models.permalink
     def get_absolute_url(self):
-        # FIXME: try to avoid using a hard-coded link
-        return "/teams/%s" % self.language.locale
+        return ('teams.views.team', [self.language.locale])
 
     def can_edit(self, user):
         return False



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