Opened 18 years ago

Closed 18 years ago

#2963 closed defect (fixed)

"How to serve static files" doc contains invalid example

Reported by: Collin Grady <cgrady@…> Owned by: Jacob
Component: Documentation Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

On http://www.djangoproject.com/documentation/static_files/ it shows the usage of django.views.static.serve as:

(r'^site_media/(.*)$', 'django.views.static.serve', {'document_root': '/path/to/media'}),

But this is invalid. It should be:

(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/path/to/media'}),

The directory index example has the same problem:

(r'^site_media/(.*)$', 'django.views.static.serve', {'document_root': '/path/to/media', 'show_indexes': True}),

should be:

(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/path/to/media', 'show_indexes': True}),

Change History (1)

comment:1 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: newclosed

(In [3952]) Fixed #2963 -- Fixed bug in docs/static_files.txt. Thanks, Collin Grady

Note: See TracTickets for help on using tickets.
Back to Top