Commit def63ea513f6a5e1ef5c58f91a5f4f34ab592260
1 parent
708d97c2
Exists in
master
and in
39 other branches
Fixing thread get_absolute_url
Showing
2 changed files
with
10 additions
and
2 deletions
Show diff stats
src/super_archives/models.py
| 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | +import urllib | ||
| 4 | + | ||
| 3 | from uuid import uuid4 | 5 | from uuid import uuid4 |
| 4 | from hashlib import md5 | 6 | from hashlib import md5 |
| 5 | 7 | ||
| @@ -71,7 +73,13 @@ class MailingList(models.Model): | @@ -71,7 +73,13 @@ class MailingList(models.Model): | ||
| 71 | last_imported_index = models.IntegerField(default=0) | 73 | last_imported_index = models.IntegerField(default=0) |
| 72 | 74 | ||
| 73 | def get_absolute_url(self): | 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 | def __unicode__(self): | 84 | def __unicode__(self): |
| 77 | return self.name | 85 | return self.name |
src/templates/home.html
| @@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
| 26 | {% endfor %} | 26 | {% endfor %} |
| 27 | </ul> | 27 | </ul> |
| 28 | <a class="column-align" | 28 | <a class="column-align" |
| 29 | - href="{% url 'haystack_search' %}?order=latest"> | 29 | + href="{% url 'haystack_search' %}?order=latest&type=thread"> |
| 30 | {% trans "View more collaborations..." %} | 30 | {% trans "View more collaborations..." %} |
| 31 | </a> | 31 | </a> |
| 32 | <div> </div> | 32 | <div> </div> |