Django

Code

Ticket #2963 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

"How to serve static files" doc contains invalid example

Reported by: Collin Grady <cgrady@the-magi.us> Assigned to: jacob
Milestone: Component: Documentation
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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}),

Attachments

Change History

10/30/06 14:52:03 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #2963 ("How to serve static files" doc contains invalid example)




Change Properties
Action