Show More
@@ -49,7 +49,6 b" urlpatterns = patterns(''," | |||
|
49 | 49 | url(r'^settings/$', settings.SettingsView.as_view(), name='settings'), |
|
50 | 50 | url(r'^tags/$', all_tags.AllTagsView.as_view(), name='tags'), |
|
51 | 51 | url(r'^captcha/', include('captcha.urls')), |
|
52 | url(r'^jump/(?P<post_id>\w+)/$', views.jump_to_post, name='jumper'), | |
|
53 | 52 | url(r'^authors/$', AuthorsView.as_view(), name='authors'), |
|
54 | 53 | url(r'^delete/(?P<post_id>\w+)/$', DeletePostView.as_view(), |
|
55 | 54 | name='delete'), |
@@ -27,22 +27,6 b" BAN_REASON_SPAM = 'Autoban: spam bot'" | |||
|
27 | 27 | DEFAULT_PAGE = 1 |
|
28 | 28 | |
|
29 | 29 | |
|
30 | # TODO Maybe this jumper is not needed any more? Only as a hack to find some | |
|
31 | # post without knowing its thread | |
|
32 | def jump_to_post(request, post_id): | |
|
33 | """Determine thread in which the requested post is and open it's page""" | |
|
34 | ||
|
35 | post = get_object_or_404(Post, id=post_id) | |
|
36 | ||
|
37 | if not post.thread: | |
|
38 | return redirect('thread', post_id=post.id) | |
|
39 | else: | |
|
40 | return redirect(reverse('thread', kwargs={'post_id': post.thread.id}) | |
|
41 | + '#' + str(post.id)) | |
|
42 | ||
|
43 | ||
|
44 | ||
|
45 | ||
|
46 | 30 | def page_404(request): |
|
47 | 31 | """Show page 404 (not found error)""" |
|
48 | 32 |
General Comments 0
You need to be logged in to leave comments.
Login now