update
[cas.git] / src / cas / urls.py
index ce01eb0..1c90a76 100644 (file)
@@ -28,9 +28,8 @@ urlpatterns = [
 
 
 if settings.DEBUG:
 
 
 if settings.DEBUG:
-    from django.views.static import serve
-    urlpatterns += [
-        path('media/<path>', serve, {
-            'document_root': settings.MEDIA_ROOT,
-        }),
-   ]
+    from django.conf.urls.static import static
+    urlpatterns += static(
+        settings.MEDIA_URL,
+        document_root=settings.MEDIA_ROOT
+    )