#13571: Static files server for dev doesn't behave as expected with flatpage app
---------------------------+------------------------------------------------
 Reporter:  christandiono  |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Uncategorized  |     Version:  1.1       
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 Or does it? (I tried searching for this bug but I didn't find it...)

 The problem happens when a flatpage has the same URL as a static files
 directory.

 The way the static server works is it adds an extra URL pattern: for
 everything that's not covered by the other URLs in urls.py, first try to
 serve it as a static file, then if the file doesn't exist return 404. The
 flatpage middleware waits for a 404, and if there is a 404 it will show
 the flatpage.

 So in production, the flatpage will be served first before attempting to
 show the directory contents (if allowed by .htaccess or httpd.conf or
 whatever it is that's being used). For the dev server, the directory
 contents will be served first before attempting to show the flatpage.

 The workaround is to disable showing directory listings in the
 configuration for the static files server.

 I don't really know if this is worth fixing, but it's kind odd to have to
 disable showing directory listings (which may be useful) in order to show
 flatpages. At the very least it's unintuitive...

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13571>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to