diff gpp/messages/views.py @ 156:7ad1f3e77cd9

Messages: use post to delete and undelete messages.
author Brian Neal <bgneal@gmail.com>
date Sun, 20 Dec 2009 05:21:57 +0000
parents ab7830b067b3
children d51743322bb2
line wrap: on
line diff
--- a/gpp/messages/views.py	Sat Dec 19 22:20:09 2009 +0000
+++ b/gpp/messages/views.py	Sun Dec 20 05:21:57 2009 +0000
@@ -8,6 +8,7 @@
 from django.shortcuts import get_object_or_404
 from django.core.urlresolvers import reverse
 from django.http import Http404
+from django.views.decorators.http import require_POST
 
 from messages.models import Message
 from messages.models import Options
@@ -162,6 +163,7 @@
 
 
 @login_required
+@require_POST
 def delete(request, msg_id):
     """
     Deletes a given message. The user must be either the sender or
@@ -208,6 +210,7 @@
 
 
 @login_required
+@require_POST
 def undelete(request, msg_id):
     """
     Undeletes a given message. The user must be either the sender or