Skip to content

Commit 276b1b0

Browse files
committed
Forward redirect to user when comment posting was succesful
1 parent f9c46e2 commit 276b1b0

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

feincms/content/comments/models.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,12 @@ def process(self, request):
6363
#if len(extra) > 0 and extra[0] == u"post-comment":
6464

6565
from django.contrib.comments.views.comments import post_comment
66-
r = post_comment(request)
67-
if not isinstance(r, HttpResponseRedirect):
68-
f = comments.get_form()(comment_page, data=request.POST)
66+
r = post_comment(request, next=comment_page.get_absolute_url())
67+
68+
if isinstance(r, HttpResponseRedirect):
69+
return r
70+
71+
f = comments.get_form()(comment_page, data=request.POST)
6972

7073
if f is None:
7174
f = comments.get_form()(comment_page)

0 commit comments

Comments
 (0)