diff --git a/boards/urls.py b/boards/urls.py --- a/boards/urls.py +++ b/boards/urls.py @@ -49,7 +49,6 @@ urlpatterns = patterns('', url(r'^settings/$', settings.SettingsView.as_view(), name='settings'), url(r'^tags/$', all_tags.AllTagsView.as_view(), name='tags'), url(r'^captcha/', include('captcha.urls')), - url(r'^jump/(?P\w+)/$', views.jump_to_post, name='jumper'), url(r'^authors/$', AuthorsView.as_view(), name='authors'), url(r'^delete/(?P\w+)/$', DeletePostView.as_view(), name='delete'), diff --git a/boards/views/__init__.py b/boards/views/__init__.py --- a/boards/views/__init__.py +++ b/boards/views/__init__.py @@ -27,22 +27,6 @@ BAN_REASON_SPAM = 'Autoban: spam bot' DEFAULT_PAGE = 1 -# TODO Maybe this jumper is not needed any more? Only as a hack to find some -# post without knowing its thread -def jump_to_post(request, post_id): - """Determine thread in which the requested post is and open it's page""" - - post = get_object_or_404(Post, id=post_id) - - if not post.thread: - return redirect('thread', post_id=post.id) - else: - return redirect(reverse('thread', kwargs={'post_id': post.thread.id}) - + '#' + str(post.id)) - - - - def page_404(request): """Show page 404 (not found error)"""