Refs #28593 -- Changed url() to path() in comments following URL routing changes.
This commit is contained in:
parent
c231a75112
commit
7619a33665
|
@ -21,7 +21,7 @@ def serve(request, path, insecure=False, **kwargs):
|
||||||
|
|
||||||
from django.contrib.staticfiles import views
|
from django.contrib.staticfiles import views
|
||||||
|
|
||||||
url(r'^(?P<path>.*)$', views.serve)
|
path('<path:path>', views.serve)
|
||||||
|
|
||||||
in your URLconf.
|
in your URLconf.
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ def serve(request, path, document_root=None, show_indexes=False):
|
||||||
|
|
||||||
from django.views.static import serve
|
from django.views.static import serve
|
||||||
|
|
||||||
url(r'^(?P<path>.*)$', serve, {'document_root': '/path/to/my/files/'})
|
path('<path:path>', serve, {'document_root': '/path/to/my/files/'})
|
||||||
|
|
||||||
in your URLconf. You must provide the ``document_root`` param. You may
|
in your URLconf. You must provide the ``document_root`` param. You may
|
||||||
also set ``show_indexes`` to ``True`` if you'd like to serve a basic index
|
also set ``show_indexes`` to ``True`` if you'd like to serve a basic index
|
||||||
|
|
Loading…
Reference in New Issue