# HG changeset patch # User neko259 # Date 2013-03-30 16:03:39 # Node ID 4d2155fb4d74021bb668adebd4eb2215767fe412 # Parent c63898fef9a544c50c143e1eeef57f1c8d4c0da5 Using redirect after a message has been posted. diff --git a/boards/views.py b/boards/views.py --- a/boards/views.py +++ b/boards/views.py @@ -31,11 +31,8 @@ def new_post(request, thread_id = boards post = Post.objects.create_post(title = title, text = text, ip = ip, parent_id = thread_id) - if thread_id != boards.models.NO_PARENT: - request.method = 'GET' - return thread(request, thread_id) - else: - return redirect(thread, id = post.id) + thread_to_show = post.id if thread_id == boards.models.NO_PARENT else thread_id + return redirect(thread, id = thread_to_show) def tag(request): """Get all tag threads (posts without a parent)."""