From def63ea513f6a5e1ef5c58f91a5f4f34ab592260 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Thu, 7 Nov 2013 16:02:11 -0200 Subject: [PATCH] Fixing thread get_absolute_url --- src/super_archives/models.py | 10 +++++++++- src/templates/home.html | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/super_archives/models.py b/src/super_archives/models.py index 03c84d3..ae55b76 100644 --- a/src/super_archives/models.py +++ b/src/super_archives/models.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- +import urllib + from uuid import uuid4 from hashlib import md5 @@ -71,7 +73,13 @@ class MailingList(models.Model): last_imported_index = models.IntegerField(default=0) def get_absolute_url(self): - return u'{}?list={}'.format(reverse('thread_list'), self.name) + params = { + 'list': self.name, + 'type': 'thread', + 'order': 'latest', + } + return u'{}?{}'.format(reverse('haystack_search'), + urllib.urlencode(params)) def __unicode__(self): return self.name diff --git a/src/templates/home.html b/src/templates/home.html index 4281d5e..5205a7f 100644 --- a/src/templates/home.html +++ b/src/templates/home.html @@ -26,7 +26,7 @@ {% endfor %} + href="{% url 'haystack_search' %}?order=latest&type=thread"> {% trans "View more collaborations..." %}
 
-- libgit2 0.21.2