Django

Code

Show
Ignore:
Timestamp:
05/28/08 15:31:03 (3 months ago)
Author:
ubernostrum
Message:

Big glaring warning in docs/flatpages.txt to remind people how response middleware works

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/flatpages.txt

    r7294 r7555  
    6767For more on middleware, read the `middleware docs`_. 
    6868 
     69.. admonition:: Ensure that your 404 template works 
     70     
     71    Note that the ``FlatpageFallbackMiddleware`` only steps in once 
     72    another view has successfully produced a 404 response. If another 
     73    view or middleware class attempts to produce a 404 but ends up 
     74    raising an exception instead (such as a ``TemplateDoesNotExist`` 
     75    exception if your site does not have an appropriate template to 
     76    use for HTTP 404 responses), the response will become an HTTP 500 
     77    ("Internal Server Error") and the ``FlatpageFallbackMiddleware`` 
     78    will not attempt to serve a flat page. 
     79 
    6980.. _SITE_ID: ../settings/#site-id 
    7081.. _RequestContext: ../templates_python/#subclassing-context-djangocontext