diff options
| author | Tobias Bengfort <tobias.bengfort@posteo.de> | 2019-05-13 18:30:51 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-05-13 18:30:51 +0200 |
| commit | 7619a33665ccc138c1583a2cce5a5de6d86c9cb4 (patch) | |
| tree | 8ad15c21257fae968d726158eda23f81caf9e66b | |
| parent | c231a75112d8a06e1a776ef97f28a3be1b343047 (diff) | |
Refs #28593 -- Changed url() to path() in comments following URL routing changes.
| -rw-r--r-- | django/contrib/staticfiles/views.py | 2 | ||||
| -rw-r--r-- | django/views/static.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/staticfiles/views.py b/django/contrib/staticfiles/views.py index 9987f49f73..6c36e7a91b 100644 --- a/django/contrib/staticfiles/views.py +++ b/django/contrib/staticfiles/views.py @@ -21,7 +21,7 @@ def serve(request, path, insecure=False, **kwargs): from django.contrib.staticfiles import views - url(r'^(?P<path>.*)$', views.serve) + path('<path:path>', views.serve) in your URLconf. diff --git a/django/views/static.py b/django/views/static.py index 90bad8db7e..d4888545a6 100644 --- a/django/views/static.py +++ b/django/views/static.py @@ -24,7 +24,7 @@ def serve(request, path, document_root=None, show_indexes=False): 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 also set ``show_indexes`` to ``True`` if you'd like to serve a basic index |
