Refs #28593 -- Changed url() to path() in comments following URL routing changes.

This commit is contained in:
Tobias Bengfort 2019-05-13 18:30:51 +02:00 committed by Mariusz Felisiak
parent c231a75112
commit 7619a33665
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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