summaryrefslogtreecommitdiff
path: root/docs/ref/views.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref/views.txt')
-rw-r--r--docs/ref/views.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/ref/views.txt b/docs/ref/views.txt
index dd1897c915..37204e2fda 100644
--- a/docs/ref/views.txt
+++ b/docs/ref/views.txt
@@ -26,13 +26,14 @@ built-in handling for user-uploaded files, but you can have Django serve your
:setting:`MEDIA_ROOT` by appending something like this to your URLconf::
from django.conf import settings
+ from django.urls import re_path
from django.views.static import serve
# ... the rest of your URLconf goes here ...
if settings.DEBUG:
urlpatterns += [
- url(r'^media/(?P<path>.*)$', serve, {
+ re_path(r'^media/(?P<path>.*)$', serve, {
'document_root': settings.MEDIA_ROOT,
}),
]