Opened 9 years ago

Closed 9 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: UI/UX:


On 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 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(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