summaryrefslogtreecommitdiff
path: root/app/lib/fdigg
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2012-09-22 22:27:04 -0400
committerluxagraf <sng@luxagraf.net>2012-09-22 22:27:04 -0400
commitefb623af0bcb47d510501c282e1326b11343a29c (patch)
tree3a35fb19f5eba3b219c65277a5fb712cbe9604ac /app/lib/fdigg
parent0b481fd7931c2ae20ca21f89a87f2ba6a6c01e10 (diff)
site reorg
Diffstat (limited to 'app/lib/fdigg')
-rw-r--r--app/lib/fdigg/__init__.py0
-rw-r--r--app/lib/fdigg/middleware.py11
2 files changed, 11 insertions, 0 deletions
diff --git a/app/lib/fdigg/__init__.py b/app/lib/fdigg/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/lib/fdigg/__init__.py
diff --git a/app/lib/fdigg/middleware.py b/app/lib/fdigg/middleware.py
new file mode 100644
index 0000000..c21ab7f
--- /dev/null
+++ b/app/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