Remove the www middleware.

master
Nick Sergeant 2012-05-16 21:57:47 -04:00
parent d7aeba630f
commit 607dbadae8
3 changed files with 0 additions and 15 deletions

View File

View File

@ -1,14 +0,0 @@
import re
from django.conf import settings
from django.core import urlresolvers
from django.http import HttpResponse, HttpResponseRedirect
class WWWMiddleware(object):
def process_request(self, request):
url = request.build_absolute_uri(request.get_full_path())
if 'www.' in url:
non_www_url = url.replace('www.', '')
return HttpResponseRedirect(non_www_url)

View File

@ -110,7 +110,6 @@ TEMPLATE_CONTEXT_PROCESSORS = (
)
MIDDLEWARE_CLASSES = (
'snipt.middleware.www.WWWMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfResponseMiddleware',