summaryrefslogtreecommitdiff
path: root/django/middleware/common.py
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-11-11 04:45:05 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-11-11 04:45:05 +0000
commit1b035c35d9bb288589d813393e635bc9546c914b (patch)
tree636e84011113d7f542cfaf45ea0921e2470e0ba6 /django/middleware/common.py
parenta11a1d5e1690fb334758fc2dbaa5478aecc8ab63 (diff)
downloaddjango-1b035c35d9bb288589d813393e635bc9546c914b.tar.gz
BACKWARDS-INCOMPATIBLE CHANGE -- Moved flatpages and redirects to standalone apps in django.contrib that are NOT installed by default. See http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges for full migration information.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1166 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/middleware/common.py')
-rw-r--r--django/middleware/common.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/django/middleware/common.py b/django/middleware/common.py
index fb37f653c1..1e437170e3 100644
--- a/django/middleware/common.py
+++ b/django/middleware/common.py
@@ -1,8 +1,6 @@
from django.conf import settings
-from django.core import exceptions
from django.utils import httpwrappers
from django.core.mail import mail_managers
-from django.views.core.flatfiles import flat_file
import md5, os
class CommonMiddleware:
@@ -17,9 +15,6 @@ class CommonMiddleware:
- ETags: If the USE_ETAGS setting is set, ETags will be calculated from
the entire page content and Not Modified responses will be returned
appropriately.
-
- - Flat files: For 404 responses, a flat file matching the given path
- will be looked up and used if found.
"""
def process_request(self, request):
@@ -55,12 +50,6 @@ class CommonMiddleware:
def process_response(self, request, response):
"Check for a flat page (for 404s) and calculate the Etag, if needed."
if response.status_code == 404:
- if settings.USE_FLAT_PAGES:
- try:
- return flat_file(request, request.path)
- except exceptions.Http404:
- pass
-
if settings.SEND_BROKEN_LINK_EMAILS:
# If the referrer was from an internal link or a non-search-engine site,
# send a note to the managers.