summaryrefslogtreecommitdiff
path: root/lib/fdigg/middleware.py
diff options
context:
space:
mode:
authorluxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f>2009-11-23 20:34:40 +0000
committerluxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f>2009-11-23 20:34:40 +0000
commitccde62e1d2c86be183b2e546957b2e77087ecde6 (patch)
tree47cd81c67958620d41d8bbcd40c75d888e4251be /lib/fdigg/middleware.py
parent526fbe767130b4dedd75841969808fe750afa22e (diff)
added externals and lib
Diffstat (limited to 'lib/fdigg/middleware.py')
-rw-r--r--lib/fdigg/middleware.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/fdigg/middleware.py b/lib/fdigg/middleware.py
new file mode 100644
index 0000000..c21ab7f
--- /dev/null
+++ b/lib/fdigg/middleware.py
@@ -0,0 +1,11 @@
+from django.shortcuts import render_to_response
+import re
+import logging
+digg_re = re.compile(r'http://digg.com/\w{1,8}/*(\?.*)?$')
+class FckDiggMiddleware(object):
+ def process_request(self, request):
+
+ if request.META.has_key('HTTP_REFERER'):
+ logging.info(request.META['HTTP_REFERER'])
+ if digg_re.search(request.META['HTTP_REFERER']):
+ return render_to_response('details/fck_digg.html') \ No newline at end of file