Skip to content
Browse files

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

… DEBUG=True. Thanks, Hugo

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 72d8e07 commit 09f32294e8a6b9f65bca44c252f78a904e9c3515 @adrianholovaty adrianholovaty committed
Showing with 3 additions and 0 deletions.
  1. +3 −0 django/contrib/flatpages/
3 django/contrib/flatpages/
@@ -1,4 +1,5 @@
from django.contrib.flatpages.views import flatpage
+from django.core.extensions import Http404
from django.conf.settings import DEBUG
class FlatpageFallbackMiddleware:
@@ -9,6 +10,8 @@ def process_response(self, request, response):
return flatpage(request, request.path)
# Return the original response if any errors happened. Because this
# is a middleware, we can't assume the errors will be caught elsewhere.
+ except Http404:
+ return response

0 comments on commit 09f3229

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