| Issue 56: | Post absolute URL fails in pagination | |
| 2 people starred this issue and may be notified of changes. | Back to list |
You can not directly access a post by the get_absolute_url method if the thread view is paginated. As a result the 'view last post' links do not work in the forum and thread list views. Initially I tried adding ?page=last to the end of the links, but the post id anchor breaks this. /#1234?page=last does not work. /?page=last#1234 does work.
May 2, 2009
Thanks for the patch. i've checked it in, and will work on a better patch sometime soon to handle cases like having a permalink to a post, links in e-mails, etc. Patch added in SVN r44.
Status:
Fixed
|
This will at least make 'view last post' work diff --git a/models.py b/models.py index 37d6e62..03cdda9 100644 --- a/models.py +++ b/models.py @@ -244,7 +244,7 @@ class Post(models.Model): ordering = ('-time',) def get_absolute_url(self): - return '%s#post%s' % (self.thread.get_absolute_url(), self.id) + return '%s?page=last#post%s' % (self.thread.get_absolute_url(), self.id) def __unicode__(self): return u"%s" % self.id