Excitedly send a user a message that their comment was posted.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 30 Jun 2011 01:51:17 +0000 (20:51 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 30 Jun 2011 01:51:17 +0000 (20:51 -0500)
mediagoblin/user_pages/views.py

index d581f19ce87390f78c37f26ae6a2dae900b046a2..399d20203fd7db0360314be61a00a4a8da5f83fe 100644 (file)
@@ -15,6 +15,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from webob import exc
+
+from mediagoblin import messages
 from mediagoblin.db.util import DESCENDING, ObjectId
 from mediagoblin.util import (
     Pagination, render_to_response, redirect, cleaned_markdown_conversion)
@@ -115,6 +117,10 @@ def media_post_comment(request):
 
     comment.save()
 
+    messages.add_message(
+        request, messages.SUCCESS,
+        'Comment posted!')
+
     return redirect(request, 'mediagoblin.user_pages.media_home',
         media = request.matchdict['media'],
         user = request.matchdict['user'])