Excitedly send a user a message that their comment was posted.
This commit is contained in:
parent
95e6da024d
commit
52359e9103
@ -15,6 +15,8 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from webob import exc
|
from webob import exc
|
||||||
|
|
||||||
|
from mediagoblin import messages
|
||||||
from mediagoblin.db.util import DESCENDING, ObjectId
|
from mediagoblin.db.util import DESCENDING, ObjectId
|
||||||
from mediagoblin.util import (
|
from mediagoblin.util import (
|
||||||
Pagination, render_to_response, redirect, cleaned_markdown_conversion)
|
Pagination, render_to_response, redirect, cleaned_markdown_conversion)
|
||||||
@ -115,6 +117,10 @@ def media_post_comment(request):
|
|||||||
|
|
||||||
comment.save()
|
comment.save()
|
||||||
|
|
||||||
|
messages.add_message(
|
||||||
|
request, messages.SUCCESS,
|
||||||
|
'Comment posted!')
|
||||||
|
|
||||||
return redirect(request, 'mediagoblin.user_pages.media_home',
|
return redirect(request, 'mediagoblin.user_pages.media_home',
|
||||||
media = request.matchdict['media'],
|
media = request.matchdict['media'],
|
||||||
user = request.matchdict['user'])
|
user = request.matchdict['user'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user