summaryrefslogtreecommitdiffstats
path: root/middleware/cancel.py
diff options
context:
space:
mode:
authorhrcerqueira <hrcerqueira@gmail.com>2010-02-18 00:14:01 +0000
committerhrcerqueira <hrcerqueira@gmail.com>2010-02-18 00:14:01 +0000
commit710574352dabcab4c710f2795a26501e54329e79 (patch)
treec34a60217501a582d6fe5b7f0ca655d88bd03c62 /middleware/cancel.py
parent473bdf5773aed8bdd91a16e371f75e628d20511e (diff)
downloadaskbot-710574352dabcab4c710f2795a26501e54329e79.tar.gz
askbot-710574352dabcab4c710f2795a26501e54329e79.tar.bz2
askbot-710574352dabcab4c710f2795a26501e54329e79.zip
Fixed some errors and moved some folders to inside the forum folder.
Diffstat (limited to 'middleware/cancel.py')
-rw-r--r--middleware/cancel.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/middleware/cancel.py b/middleware/cancel.py
deleted file mode 100644
index 51e1b253..00000000
--- a/middleware/cancel.py
+++ /dev/null
@@ -1,15 +0,0 @@
-from django.http import HttpResponseRedirect
-from utils.forms import get_next_url
-import logging
-class CancelActionMiddleware(object):
- def process_view(self, request, view_func, view_args, view_kwargs):
- if 'cancel' in request.REQUEST:
- #todo use session messages for the anonymous users
- try:
- msg = getattr(view_func,'CANCEL_MESSAGE')
- except AttributeError:
- msg = 'action canceled'
- request.user.message_set.create(message=msg)
- return HttpResponseRedirect(get_next_url(request))
- else:
- return None