Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #845 -- flatpages middleware no longer throws 404 exception for…

… DEBUG=True. Thanks, Hugo

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 09f32294e8a6b9f65bca44c252f78a904e9c3515 1 parent 72d8e07
Adrian Holovaty authored November 20, 2005

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  django/contrib/flatpages/middleware.py
3  django/contrib/flatpages/middleware.py
... ...
@@ -1,4 +1,5 @@
1 1
 from django.contrib.flatpages.views import flatpage
  2
+from django.core.extensions import Http404
2 3
 from django.conf.settings import DEBUG
3 4
 
4 5
 class FlatpageFallbackMiddleware:
@@ -9,6 +10,8 @@ def process_response(self, request, response):
9 10
             return flatpage(request, request.path)
10 11
         # Return the original response if any errors happened. Because this
11 12
         # is a middleware, we can't assume the errors will be caught elsewhere.
  13
+        except Http404:
  14
+            return response
12 15
         except:
13 16
             if DEBUG:
14 17
                 raise

0 notes on commit 09f3229

Please sign in to comment.
Something went wrong with that request. Please try again.