Add some extra metadata to notifications

This commit is contained in:
Trever Fischer
2012-06-08 14:54:00 -04:00
parent f99949cb7b
commit cad9da3446
3 changed files with 4 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ def reply(request, topicID=None):
reply.body = form.cleaned_data['body']
reply.user = request.user
reply.save()
notification.send([reply.parent.user], "forum_reply", {"reply": reply})
notification.send([reply.parent.user], "forum_reply", {"reply": reply, 'notice_url': reverse('forums.views.post', kwargs={'id':reply.id}), 'notice_description': reply.topic().title})
messages.info(request, "Reply successful")
return HttpResponseRedirect(reverse('forums.views.post', kwargs={"id":reply.id}))
return render_to_response('forums/reply.html', {"post":parentPost, "form":form}, context_instance = RequestContext(request))