blob: c21ab7fc6ee38f6d80c8c6e72d9baa612994e6fb (
plain)
1
2
3
4
5
6
7
8
9
10
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')
|