Show More
@@ -36,15 +36,16 b' class ReflinkPattern(Pattern):' | |||
|
36 | 36 | def handleMatch(self, m): |
|
37 | 37 | post_id = m.group(4) |
|
38 | 38 | |
|
39 | post = Post.objects.filter(id=post_id) | |
|
40 | if post: | |
|
39 | posts = boards.models.Post.objects.filter(id=post_id) | |
|
40 | if posts.count() > 0: | |
|
41 | 41 | ref_element = etree.Element('a') |
|
42 | 42 | |
|
43 | post = posts[0] | |
|
43 | 44 | if post.thread: |
|
44 |
link = reverse(thread, kwargs={'post_id': post.thread.id}) |
|
|
45 |
+ '#' + post_id |
|
|
45 | link = reverse(boards.views.thread, kwargs={'post_id': post.thread.id}) \ | |
|
46 | + '#' + post_id | |
|
46 | 47 | else: |
|
47 | link = reverse(thread, post_id=post_id) | |
|
48 | link = reverse(boards.views.thread, post_id=post_id) | |
|
48 | 49 | |
|
49 | 50 | ref_element.set('href', link) |
|
50 | 51 | ref_element.text = m.group(2) |
General Comments 0
You need to be logged in to leave comments.
Login now