Skip to content

Commit

Permalink
After commenting on a discussion, it redirects back to the discussion…
Browse files Browse the repository at this point in the history
… instead of to the default viewer for the item.
  • Loading branch information
mikemintz committed May 5, 2013
1 parent 9e4d4bd commit fee347e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deme_django/modules/discussionboard/views.py
@@ -1,3 +1,4 @@
from django.core.urlresolvers import reverse
from django.template import Context, loader
from django.http import HttpResponse, HttpResponseRedirect
from cms.views import ItemViewer
Expand Down Expand Up @@ -40,7 +41,7 @@ def item_creatediscussion_html(self):
new_item.item = self.item
new_item.item_version_number = self.item.version_number
new_item.save_versioned(action_agent=self.cur_agent)
redirect = self.item.get_absolute_url()
redirect = reverse('item_url', kwargs={'viewer': 'discussion', 'action': 'show', 'noun': self.item.pk})
return HttpResponseRedirect(redirect)

def item_createreply_html(self):
Expand Down

0 comments on commit fee347e

Please sign in to comment.