0
0
mirror of https://github.com/django/django.git synced 2024-11-30 23:20:50 +01:00

Fixed #2963 -- Fixed bug in docs/static_files.txt. Thanks, Collin Grady

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-10-30 20:52:02 +00:00
parent 41d11a685f
commit 149933075a

View File

@ -31,7 +31,7 @@ How to do it
Just put this in your URLconf_::
(r'^site_media/(.*)$', 'django.views.static.serve', {'document_root': '/path/to/media'}),
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/path/to/media'}),
...where ``site_media`` is the URL where your media will be rooted, and
``/path/to/media`` is the filesystem root for your media.
@ -60,7 +60,7 @@ listings for directories.
Example::
(r'^site_media/(.*)$', 'django.views.static.serve', {'document_root': '/path/to/media', 'show_indexes': True}),
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/path/to/media', 'show_indexes': True}),
You can customize the index view by creating a template called
``static/directory_index``. That template gets two objects in its context: