mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Refs #28593 -- Changed url() to path() in comments following URL routing changes.
This commit is contained in:
parent
c231a75112
commit
7619a33665
2 changed files with 2 additions and 2 deletions
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue