Commit def63ea513f6a5e1ef5c58f91a5f4f34ab592260

Authored by Sergio Oliveira
1 parent 708d97c2

Fixing thread get_absolute_url

src/super_archives/models.py
1 1 # -*- coding: utf-8 -*-
2 2  
  3 +import urllib
  4 +
3 5 from uuid import uuid4
4 6 from hashlib import md5
5 7  
... ... @@ -71,7 +73,13 @@ class MailingList(models.Model):
71 73 last_imported_index = models.IntegerField(default=0)
72 74  
73 75 def get_absolute_url(self):
74   - return u'{}?list={}'.format(reverse('thread_list'), self.name)
  76 + params = {
  77 + 'list': self.name,
  78 + 'type': 'thread',
  79 + 'order': 'latest',
  80 + }
  81 + return u'{}?{}'.format(reverse('haystack_search'),
  82 + urllib.urlencode(params))
75 83  
76 84 def __unicode__(self):
77 85 return self.name
... ...
src/templates/home.html
... ... @@ -26,7 +26,7 @@
26 26 {% endfor %}
27 27 </ul>
28 28 <a class="column-align"
29   - href="{% url 'haystack_search' %}?order=latest">
  29 + href="{% url 'haystack_search' %}?order=latest&type=thread">
30 30 {% trans "View more collaborations..." %}
31 31 </a>
32 32 <div>&nbsp;</div>
... ...