diff options
-rw-r--r-- | releng/models.py | 4 | ||||
-rw-r--r-- | templates/releng/iso_overview.html | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/releng/models.py b/releng/models.py index ceac948b..3afef55e 100644 --- a/releng/models.py +++ b/releng/models.py @@ -1,3 +1,4 @@ +from django.core.urlresolvers import reverse from django.db import models from django.db.models.signals import pre_save @@ -48,6 +49,9 @@ class Iso(models.Model): removed = models.DateTimeField(null=True, blank=True, default=None) active = models.BooleanField(default=True) + def get_absolute_url(self): + return reverse('releng-results-iso', args=[self.pk]) + def __unicode__(self): return self.name diff --git a/templates/releng/iso_overview.html b/templates/releng/iso_overview.html index ee3aaed3..054e0fa7 100644 --- a/templates/releng/iso_overview.html +++ b/templates/releng/iso_overview.html @@ -19,9 +19,7 @@ {% for iso in isos %} <tr> <td> - <a href="{% url releng-results-iso iso.pk %}"> - {{ iso.name }} - </a> + <a href="{{ iso.get_absolute_url }}">{{ iso.name }}</a> </td> <td> {{ iso.active|yesno }} |